Created
February 13, 2024 15:21
-
-
Save DDOrozco17/75f592c1360255ea44b11943258eaaac to your computer and use it in GitHub Desktop.
Ejemplo de AppBar con propiedades en Flutter
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
import 'package:flutter/material.dart'; | |
void main() => runApp(const MiAplicacion()); | |
class MiAplicacion extends StatelessWidget { | |
const MiAplicacion({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return const MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: EjMiAplicacion(), | |
); | |
} | |
} | |
class EjMiAplicacion extends StatelessWidget { | |
const EjMiAplicacion({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
automaticallyImplyLeading: true, | |
title: const Text("Ejemplo de appBar"), | |
centerTitle: true, | |
actions: [ | |
IconButton( | |
icon: const Icon(Icons.search), | |
onPressed: () { | |
}, | |
), | |
IconButton( | |
icon: const Icon(Icons.more_vert,), | |
onPressed: () { | |
}, | |
), | |
IconButton( | |
icon: const Icon(Icons.add_card,), | |
onPressed: () { | |
}, | |
), | |
], | |
toolbarHeight: 70, | |
shape: StadiumBorder(), | |
elevation: 8, | |
backgroundColor: Colors.blue, | |
shadowColor: Colors.blueGrey, | |
),//fin de appBar | |
drawer: const Drawer(), | |
body: const Center( | |
child: Text( | |
'Inicio Diego Diaz', | |
style: TextStyle(fontSize: 24), | |
), | |
), | |
);//fin de Scaffold estructura | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trabajando con AppBar
![image](https://private-user-images.githubusercontent.com/143548028/304461278-2c0897b2-cdee-471f-9d2f-acbd716926b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg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C1BbXotRGF0ZT0yMDI0MDYxNFQwNjU3MDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05ZWI0ZDkzZTliOGVkZjk1NzU1YWIxNWNhYzZmNDU5OGY3NTEzYTAwOGM0Y2MzZGUxYWFjYmQyMzZlNTFhNDc2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.NMvjnTkvVjHUovfAU2J2mBBq0Th5py1fEgWbwcdRbuk)
Diseño
Resultado de mi codigo en flutter
Link de referencias
https://api.flutter.dev/flutter/material/AppBar-class.html
https://codesinsider.com/flutter-appbar-example-tutorial/?expand_article=1
https://dartpad.dev/?id=75f592c1360255ea44b11943258eaaac