Skip to content

Commit

Permalink
Refactored the TButton
Browse files Browse the repository at this point in the history
  • Loading branch information
rajivmanivannan committed May 10, 2023
1 parent b46e047 commit 2b5e252
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
16 changes: 10 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,30 @@ class _HomePageState extends State<HomePage> {
return Scaffold(
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 30),
children: const [
children: [
TButton(
label: "Hello",
icon: FluentIcons.access_time_24_regular,
icon: FluentIcons.circle_12_filled,
tButtonType: TButtonType.primary,
onPressed: (){},
),
TButton(
TButton(
label: "Hello",
icon: FluentIcons.access_time_24_regular,
icon: FluentIcons.circle_12_filled,
tButtonType: TButtonType.secondary,
onPressed: (){},
),
TButton(
label: "Hello",
icon: FluentIcons.access_time_24_regular,
icon: FluentIcons.circle_12_filled,
tButtonType: TButtonType.outlined,
onPressed: (){},
),
TButton(
label: "Hello",
icon: FluentIcons.access_time_24_regular,
icon: FluentIcons.circle_12_filled,
tButtonType: TButtonType.ghost,
onPressed: (){},
)
]));
}
Expand Down
4 changes: 2 additions & 2 deletions lib/components/button/t_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TButton extends StatelessWidget {
switch (tButtonType) {
case TButtonType.primary:
return ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: TColors.secondary),
style: ElevatedButton.styleFrom(backgroundColor: TColors.primary),
onPressed: onPressed,
child: child,
);
Expand All @@ -46,7 +46,7 @@ class TButton extends StatelessWidget {
);
case TButtonType.outlined:
return OutlinedButton(
style: OutlinedButton.styleFrom(backgroundColor: TColors.secondary),
style: OutlinedButton.styleFrom(),
onPressed: onPressed,
child: child,
);
Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
fluentui_system_icons:
dependency: "direct main"
description:
name: fluentui_system_icons
sha256: ae3685648c572fa8011cec8d59a36278fa500d29f7164d4e769551d48b3ce8af
url: "https://pub.dev"
source: hosted
version: "1.1.200"
flutter:
dependency: "direct main"
description: flutter
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ environment:
dependencies:
flutter:
sdk: flutter
fluentui_system_icons: ^1.1.200

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 2b5e252

Please sign in to comment.