Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: Text('Mint Retail'), ), drawer: CustomDrawer(), body: Center( child: Text('Home Page Content'), ), ), ); } } class CustomDrawer extends StatefulWidget { @override _CustomDrawerState createState() => _CustomDrawerState(); } class _CustomDrawerState extends State
{ bool isHistoryExpanded = false; @override Widget build(BuildContext context) { return Drawer( child: ListView( padding: EdgeInsets.zero, children:
[ DrawerHeader( decoration: BoxDecoration( color: Colors.blue, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ CircleAvatar( backgroundColor: Colors.white, child: Icon(Icons.store), ), SizedBox(height: 10), Text( 'Mint Retail', style: TextStyle( color: Colors.white, fontSize: 24, ), ), Text( 'Testing Mint Retail', style: TextStyle( color: Colors.white, ), ), ], ), ), ListTile( leading: Icon(Icons.home), title: Text('Home'), onTap: () { Navigator.pop(context); }, ), ListTile( leading: Icon(Icons.shopping_cart), title: Text('Produk'), onTap: () { Navigator.pop(context); }, ), ListTile( leading: Icon(Icons.category), title: Text('Kategori'), onTap: () { Navigator.pop(context); }, ), ExpansionTile( leading: Icon(Icons.history), title: Text('History'), children:
[ ListTile( leading: Icon(Icons.history), title: Text('History'), onTap: () { Navigator.pop(context); }, ), ListTile( leading: Icon(Icons.assessment), title: Text('Summary'), onTap: () { Navigator.pop(context); }, ), ], onExpansionChanged: (bool expanded) { setState(() { isHistoryExpanded = expanded; }); }, ), ListTile( leading: Icon(Icons.person), title: Text('Profile'), onTap: () { Navigator.pop(context); }, ), Divider(), ListTile( leading: Icon(Icons.logout), title: Text('Logout'), onTap: () { // Aksi logout Navigator.pop(context); }, ), ], ), ); } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)