Skip to content

Instantly share code, notes, and snippets.

@rommyarb
Created April 5, 2020 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rommyarb/3a08f971195ab756de8230cfec402346 to your computer and use it in GitHub Desktop.
Save rommyarb/3a08f971195ab756de8230cfec402346 to your computer and use it in GitHub Desktop.
Pke Otak
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(leading: Icon(Icons.home), title: Text("Pke Otak")),
body: Center(
child: MyWidget(),
),
),
);
}
}
Widget tombol(String text) {
return Container(
margin: EdgeInsets.all(10),
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
IconButton(onPressed: () {}, icon: Icon(Icons.shop)),
Text(text)
]));
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(mainAxisAlignment: MainAxisAlignment.center, children: [
Text("Categories"),
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
tombol("Men"),
tombol("Women"),
tombol("Devices"),
tombol("Gadgets"),
tombol("Gaming")
])
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment