Skip to content

Instantly share code, notes, and snippets.

@BuildCodelessly
Created May 7, 2024 07:08
Show Gist options
  • Select an option

  • Save BuildCodelessly/34cb75412194bb4461ff76485a3e6ed5 to your computer and use it in GitHub Desktop.

Select an option

Save BuildCodelessly/34cb75412194bb4461ff76485a3e6ed5 to your computer and use it in GitHub Desktop.
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