Created
May 7, 2024 07:08
-
-
Save BuildCodelessly/34cb75412194bb4461ff76485a3e6ed5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return const MaterialApp( | |
| title: 'MyApp Demo', | |
| debugShowCheckedModeBanner: false, | |
| home: Scaffold( | |
| body: Center( | |
| child: AppBar1(), | |
| ), | |
| ), | |
| ); | |
| } | |
| } | |
| class AppBar1 extends StatelessWidget { | |
| const AppBar1({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return SizedBox( | |
| width: 1051, | |
| child: AppBar( | |
| leading: IconButton( | |
| iconSize: 24, | |
| onPressed: () {}, | |
| icon: const Icon(Icons.menu), | |
| ), | |
| automaticallyImplyLeading: false, | |
| title: const Text('Title'), | |
| actions: [ | |
| IconButton( | |
| iconSize: 24, | |
| onPressed: () {}, | |
| icon: const Icon(Icons.favorite_rounded), | |
| tooltip: 'Favorite', | |
| ), | |
| IconButton( | |
| iconSize: 24, | |
| onPressed: () {}, | |
| icon: const Icon(Icons.search), | |
| tooltip: 'Search', | |
| ) | |
| ], | |
| shadowColor: Colors.black, | |
| backgroundColor: const Color(0xFF5C69E5), | |
| foregroundColor: Colors.white, | |
| centerTitle: false, | |
| toolbarHeight: 52, | |
| titleTextStyle: const TextStyle( | |
| color: Colors.white, | |
| fontSize: 18, | |
| fontFamily: 'Roboto', | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment