Modular menus
This commit is contained in:
parent
f47eb88980
commit
ee9c2ce4a4
@ -23,19 +23,6 @@ class _MainMenuState extends State<MainMenu> {
|
|||||||
ProfileScreen(),
|
ProfileScreen(),
|
||||||
];
|
];
|
||||||
|
|
||||||
// void _onItemTapped(int index) {
|
|
||||||
// Future.delayed(Duration(milliseconds: 100), () {
|
|
||||||
// Navigator.pushReplacement(
|
|
||||||
// context,
|
|
||||||
// MaterialPageRoute(builder: (context) => _screens[index]),
|
|
||||||
// );
|
|
||||||
// });
|
|
||||||
|
|
||||||
// setState(() {
|
|
||||||
// selectedIndex = index;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final Size size = MediaQuery.of(context).size;
|
final Size size = MediaQuery.of(context).size;
|
||||||
@ -44,7 +31,12 @@ class _MainMenuState extends State<MainMenu> {
|
|||||||
return Container(
|
return Container(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 5),
|
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 5),
|
||||||
child: Row(
|
child: _btns(context, selectedIndex),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Row _btns(BuildContext context, int selectedIndex) {
|
||||||
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@ -74,7 +66,6 @@ class _MainMenuState extends State<MainMenu> {
|
|||||||
isSelected: selectedIndex == 3,
|
isSelected: selectedIndex == 3,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,12 +5,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:freekake/components/card_list.dart';
|
import 'package:freekake/components/card_list.dart';
|
||||||
import 'package:freekake/components/collection_container%20copy.dart';
|
import 'package:freekake/components/collection_container%20copy.dart';
|
||||||
// import 'package:freekake/components/main_menu.dart';
|
|
||||||
// import 'package:freekake/components/topbar_container.dart';
|
|
||||||
import 'package:freekake/helpers/color_helper.dart';
|
import 'package:freekake/helpers/color_helper.dart';
|
||||||
import 'package:list_detail_extension/list_detail_extension.dart';
|
import 'package:list_detail_extension/list_detail_extension.dart';
|
||||||
|
|
||||||
// import 'package:freekake/screen/pustaka/pustaka_detail_screen.dart';
|
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user