-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2295 from acterglobal/kumar/quick-action-buttons
Quick action buttons
- Loading branch information
Showing
12 changed files
with
524 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- New Quick action buttons now accessible by swipe-up on bottom navigation bar and from side bar navigation panel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class DragHandleWidget extends StatelessWidget { | ||
final double? width; | ||
final Color? color; | ||
|
||
const DragHandleWidget({ | ||
super.key, | ||
this.width, | ||
this.color, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
height: 3, | ||
width: width ?? 40, | ||
decoration: BoxDecoration( | ||
color: color ?? Theme.of(context).colorScheme.onSurface, | ||
borderRadius: const BorderRadius.all(Radius.circular(30.0)), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class ActionButtonWidget extends StatelessWidget { | ||
final String title; | ||
final IconData iconData; | ||
final Color color; | ||
final EdgeInsets? padding; | ||
final VoidCallback? onPressed; | ||
|
||
const ActionButtonWidget({ | ||
super.key, | ||
required this.title, | ||
required this.iconData, | ||
required this.color, | ||
this.padding, | ||
this.onPressed, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: padding ?? EdgeInsets.zero, | ||
child: TextButton.icon( | ||
key: key, | ||
onPressed: onPressed, | ||
icon: Container( | ||
padding: const EdgeInsets.all(10), | ||
decoration: BoxDecoration( | ||
color: color, | ||
borderRadius: const BorderRadius.all(Radius.circular(100)), | ||
), | ||
child: Icon(iconData, size: 14), | ||
), | ||
label: Text(title), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.