-
Notifications
You must be signed in to change notification settings - Fork 5
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 #9 from mirmoktadir/testing
upgrade appbar
- Loading branch information
Showing
5 changed files
with
64 additions
and
52 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,40 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:get/get.dart'; | ||
import 'package:iconly/iconly.dart'; | ||
import 'package:iconsax/iconsax.dart'; | ||
|
||
class MainAppBar extends StatelessWidget implements PreferredSizeWidget { | ||
const MainAppBar({ | ||
super.key, | ||
required this.prefixAction, | ||
required this.suffixAction, | ||
}); | ||
final VoidCallback prefixAction; | ||
final VoidCallback suffixAction; | ||
@override | ||
Widget build(BuildContext context) { | ||
return AppBar( | ||
title: const Text('GetX Standard'), | ||
leading: IconButton( | ||
onPressed: prefixAction, | ||
icon: Icon( | ||
Get.isDarkMode ? Iconsax.moon5 : Iconsax.moon5, | ||
color: Get.isDarkMode ? Colors.white : Colors.black, | ||
), | ||
), | ||
actions: [ | ||
IconButton( | ||
onPressed: suffixAction, | ||
icon: const Icon( | ||
IconlyBold.graph, | ||
color: Colors.white, | ||
), | ||
), | ||
], | ||
centerTitle: true, | ||
); | ||
} | ||
|
||
@override | ||
Size get preferredSize => const Size.fromHeight(kToolbarHeight); | ||
} |
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
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