Untitled
unknown
plain_text
2 years ago
5.1 kB
4
Indexable
import 'package:bubble_bottom_bar/bubble_bottom_bar.dart'; import 'package:flutter/material.dart'; class HomeScreen extends StatelessWidget { const HomeScreen({super.key}); final HomeController homeController = Get.put(HomeController()); @override Widget build(BuildContext context) { return GetBuilder<HomeController>( init: homeController, builder: (controller) { return Scaffold( body: SafeArea( child: Container( color: Colors.white, height: double.infinity, width: double.infinity, child: SingleChildScrollView( physics: const AlwaysScrollableScrollPhysics(), padding: const EdgeInsets.symmetric( horizontal: 25, vertical: 30, ), // child: SingleChildScrollView( child: Column( children: [ SizedBox( height: 50, child: ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: const Color.fromARGB(255, 228, 228, 228), // elevation: 5, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(28), ), ), onPressed: (() {}), child: Row( children: const [ Icon( Icons.search, color: Colors.black, ), SizedBox( width: 10, ), Text( 'Search Categories', style: TextStyle( color: Color.fromARGB(255, 115, 113, 113), fontSize: 15, ), ), ], ), ), ), const SizedBox( height: 10, ), ListView.builder( shrinkWrap: true, itemCount: 5, // homeController.res.total, physics: const NeverScrollableScrollPhysics(), itemBuilder: (context, index) { return Padding( padding: const EdgeInsets.symmetric(vertical: 10), child: Container( height: 120, decoration: BoxDecoration( borderRadius: BorderRadius.circular(20.0), color: Color.fromARGB(255, 143, 140, 140), ), ), ); }, ) ], ), // ), ), ), ), floatingActionButton: FloatingActionButton( onPressed: () {}, child: Icon(Icons.add), backgroundColor: Colors.red, ), floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, bottomNavigationBar: BubbleBottomBar( opacity: .2, currentIndex: 1, onTap: null, borderRadius: BorderRadius.vertical(top: Radius.circular(16)), elevation: 8, fabLocation: BubbleBottomBarFabLocation.end, //new hasNotch: true, //new hasInk: true, //new, gives a cute ink effect inkColor: Colors.black12, //optional, uses theme color if not specified items: <BubbleBottomBarItem>[ BubbleBottomBarItem( backgroundColor: Colors.red, icon: Icon( Icons.dashboard, color: Colors.black, ), activeIcon: Icon( Icons.dashboard, color: Colors.red, ), title: Text("Home")), BubbleBottomBarItem( backgroundColor: Colors.deepPurple, icon: Icon( Icons.access_time, color: Colors.black, ), activeIcon: Icon( Icons.access_time, color: Colors.deepPurple, ), title: Text("Logs")), BubbleBottomBarItem( backgroundColor: Colors.indigo, icon: Icon( Icons.folder_open, color: Colors.black, ), activeIcon: Icon( Icons.folder_open, color: Colors.indigo, ), title: Text("Folders")), BubbleBottomBarItem( backgroundColor: Colors.green, icon: Icon( Icons.menu, color: Colors.black, ), activeIcon: Icon( Icons.menu, color: Colors.green, ), title: Text("Menu")) ], ), ); }); } }
Editor is loading...