* Implemented hasSettingsLoaded reducer * Added Padding to Progress List View * Created Settings and Time Progress List Store Connector * Rewritten Home Active Tab * Fixed missing onTap in Progress List Tile * Started using new Store Connectors in Inactive and Settings Tab * Created Time Progress Store Connector * Rewritten ProgressDetailScreen with new Store Connectors * Rewritten DatePickerBtn with TextButton * Deleted unused widget * Changed Foreground Color behaviour in ColorPicker BTN * Created Select Duration Button * Rewritten Duration Setting Widget * Updated Version Number Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
| import 'package:flutter/material.dart';
 | |
| import 'package:time_progress_tracker/widgets/buttons/create_progress_button.dart';
 | |
| import 'package:time_progress_tracker/widgets/home/home_bottom_navbar.dart';
 | |
| import 'package:time_progress_tracker/widgets/home/tabs/home_active_progresses_tab.dart';
 | |
| import 'package:time_progress_tracker/widgets/home/tabs/home_inactive_progresses_tab.dart';
 | |
| import 'package:time_progress_tracker/widgets/home/tabs/home_settings_tab.dart';
 | |
| 
 | |
| class HomeScreen extends StatefulWidget {
 | |
|   static const routeName = "/home";
 | |
|   static const title = "Time Progress Tracker";
 | |
| 
 | |
|   @override
 | |
|   State<StatefulWidget> createState() {
 | |
|     return _HomeScreenState();
 | |
|   }
 | |
| }
 | |
| 
 | |
| class _HomeScreenState extends State<HomeScreen> {
 | |
|   int _currentIndex = 0;
 | |
|   final List<Widget> _children = [
 | |
|     HomeActiveProgressesTab(),
 | |
|     HomeInactiveProgressesTab(),
 | |
|     HomeSettingsTab(),
 | |
|   ];
 | |
| 
 | |
|   void onBottomTabTapped(int index) {
 | |
|     setState(() {
 | |
|       _currentIndex = index;
 | |
|     });
 | |
|   }
 | |
| 
 | |
|   @override
 | |
|   Widget build(BuildContext context) {
 | |
|     return Scaffold(
 | |
|       appBar: AppBar(
 | |
|         title: Text(HomeScreen.title),
 | |
|       ),
 | |
|       body: _children[_currentIndex],
 | |
|       floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
 | |
|       floatingActionButton: _currentIndex != 2 ? CreateProgressButton() : null,
 | |
|       bottomNavigationBar: HomeBottomNavBar(
 | |
|         currentIndex: _currentIndex,
 | |
|         onTap: onBottomTabTapped,
 | |
|       ),
 | |
|     );
 | |
|   }
 | |
| }
 |