implemented new loadable state concept
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
// import '../../../state/infrastructure/loadable_state.dart';
|
||||
// import '../../../state/infrastructure/state_extensions.dart';
|
||||
// import '../../../state/widgets/controller_consumer.dart';
|
||||
// import '../../../state/widgets/loadable_controller_consumer.dart';
|
||||
// import '../../../state/widgets/loadable_state_consumer.dart';
|
||||
// import '../../../state/widgets/sub_selected_controller_consumer.dart';
|
||||
// import '../../../state/widgets/controller_provider.dart';
|
||||
//
|
||||
|
@ -6,15 +6,14 @@ import 'package:in_app_review/in_app_review.dart';
|
||||
import '../../extensions/renderNotNull.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
|
||||
import '../../state/app/modules/gradeAverages/screens/grade_averages_view.dart';
|
||||
import '../../state/app/modules/gradeAverages/view/grade_averages_view.dart';
|
||||
import '../../state/app/modules/marianumMessage/view/marianum_message_list_view.dart';
|
||||
import '../../widget/ListItem.dart';
|
||||
import '../../widget/centeredLeading.dart';
|
||||
import '../../widget/infoDialog.dart';
|
||||
import '../settings/settings.dart';
|
||||
import 'more/feedback/feedbackDialog.dart';
|
||||
import 'more/gradeAverages/gradeAverage.dart';
|
||||
import 'more/holidays/holidays.dart';
|
||||
import 'more/message/message.dart';
|
||||
import 'more/roomplan/roomplan.dart';
|
||||
import 'more/share/selectShareTypeDialog.dart';
|
||||
|
||||
@ -31,9 +30,9 @@ class Overhang extends StatelessWidget {
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
const ListItemNavigator(icon: Icons.newspaper, text: 'Marianum Message', target: Message()),
|
||||
const ListItemNavigator(icon: Icons.newspaper, text: 'Marianum Message', target: MarianumMessageListView()),
|
||||
const ListItemNavigator(icon: Icons.room, text: 'Raumplan', target: Roomplan()),
|
||||
const ListItemNavigator(icon: Icons.calculate, text: 'Notendurschnittsrechner', target: GradeAverage()),
|
||||
const ListItemNavigator(icon: Icons.calculate, text: 'Notendurschnittsrechner', target: GradeAveragesView()),
|
||||
const ListItemNavigator(icon: Icons.calendar_month, text: 'Schulferien', target: Holidays()),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
@ -77,7 +76,7 @@ class Overhang extends StatelessWidget {
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.science_outlined),
|
||||
onTap: () => pushScreen(context, withNavBar: false, screen: const GradeAveragesScreen()),
|
||||
// onTap: () => pushScreen(context, withNavBar: false, screen: const GradeAveragesScreen()),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hydrated_bloc/hydrated_bloc.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../storage/base/settingsProvider.dart';
|
||||
@ -109,6 +110,26 @@ class _DevToolsSettingsDialogState extends State<DevToolsSettingsDialog> {
|
||||
},
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
),
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.data_object)),
|
||||
title: const Text('BLOC State cache'),
|
||||
subtitle: FutureBuilder(
|
||||
future: const CacheView().totalSize(),
|
||||
builder: (context, snapshot) => Text("etwa ${snapshot.hasError ? "?" : snapshot.hasData ? filesize(snapshot.data) : "..."}\nLange tippen um zu löschen"),
|
||||
),
|
||||
onTap: () {
|
||||
// Navigator.push(context, MaterialPageRoute(builder: (context) => const CacheView()));
|
||||
},
|
||||
onLongPress: () {
|
||||
ConfirmDialog(
|
||||
title: 'BLOC-Cache löschen',
|
||||
content: 'Alle cache Einträge werden gelöscht. Der Cache wird bei Nutzung der App automatisch erneut aufgebaut',
|
||||
confirmButton: 'Unwiederruflich löschen',
|
||||
onConfirm: () => HydratedBloc.storage.clear(),
|
||||
).asDialog(context);
|
||||
},
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user