mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2024-12-21 21:47:29 +01:00
Upgrade dependencies
This commit is contained in:
parent
4e60f528cb
commit
067ae564ce
@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:get_it/get_it.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import '../../models/themes/theme.dart';
|
import '../../models/themes/theme.dart';
|
||||||
@ -13,24 +12,20 @@ part 'theme_event.dart';
|
|||||||
part 'theme_state.dart';
|
part 'theme_state.dart';
|
||||||
|
|
||||||
class ThemeBloc extends Bloc<ThemeEvent, ThemeState> {
|
class ThemeBloc extends Bloc<ThemeEvent, ThemeState> {
|
||||||
bool prefsAreLoaded = false;
|
|
||||||
|
|
||||||
ThemeBloc() : super(const LightThemeState()) {
|
ThemeBloc() : super(const LightThemeState()) {
|
||||||
SharedPreferences.getInstance().then((prefs) {
|
on<SetTheme>(
|
||||||
prefsAreLoaded = true;
|
(event, emit) => emit(
|
||||||
add(
|
event.themeIsDark ? const DarkThemeState() : const LightThemeState(),
|
||||||
SetTheme(
|
|
||||||
themeIsDark: prefs.getBool('darkThemeEnabled') ?? false,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
add(
|
||||||
Stream<ThemeState> mapEventToState(ThemeEvent event) async* {
|
SetTheme(
|
||||||
if (event is SetTheme)
|
themeIsDark: GetIt.instance
|
||||||
yield event.themeIsDark
|
.get<SharedPreferences>()
|
||||||
? DarkThemeState(prefsAreLoaded: prefsAreLoaded)
|
.getBool('darkThemeEnabled') ??
|
||||||
: LightThemeState(prefsAreLoaded: prefsAreLoaded);
|
false,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,24 +2,20 @@ part of 'theme_bloc.dart';
|
|||||||
|
|
||||||
@immutable
|
@immutable
|
||||||
abstract class ThemeState {
|
abstract class ThemeState {
|
||||||
final bool prefsAreLoaded;
|
const ThemeState();
|
||||||
|
|
||||||
const ThemeState({required this.prefsAreLoaded});
|
|
||||||
|
|
||||||
AppTheme get theme;
|
AppTheme get theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LightThemeState extends ThemeState {
|
class LightThemeState extends ThemeState {
|
||||||
const LightThemeState({bool prefsAreLoaded = false})
|
const LightThemeState();
|
||||||
: super(prefsAreLoaded: prefsAreLoaded);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
AppTheme get theme => LightTheme();
|
AppTheme get theme => LightTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
class DarkThemeState extends ThemeState {
|
class DarkThemeState extends ThemeState {
|
||||||
const DarkThemeState({bool prefsAreLoaded = false})
|
const DarkThemeState();
|
||||||
: super(prefsAreLoaded: prefsAreLoaded);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
AppTheme get theme => DarkTheme();
|
AppTheme get theme => DarkTheme();
|
||||||
|
151
lib/main.dart
151
lib/main.dart
@ -2,40 +2,41 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get_it/get_it.dart';
|
import 'package:get_it/get_it.dart';
|
||||||
import 'package:mdi/mdi.dart';
|
|
||||||
import 'package:path/path.dart';
|
import 'package:path/path.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:sembast/sembast.dart';
|
import 'package:sembast/sembast.dart';
|
||||||
import 'package:sembast/sembast_io.dart';
|
import 'package:sembast/sembast_io.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import 'bloc/theme/theme_bloc.dart';
|
import 'bloc/theme/theme_bloc.dart';
|
||||||
import 'models/themes/theme.dart';
|
|
||||||
import 'router.dart';
|
import 'router.dart';
|
||||||
import 'view/components/common/splash.dart';
|
|
||||||
import 'view/screens/history.dart';
|
Future<void> setupDatabase() async {
|
||||||
import 'view/screens/search/kanji_view.dart';
|
final Directory appDocDir = await getApplicationDocumentsDirectory();
|
||||||
import 'view/screens/search/search_view.dart';
|
if (!appDocDir.existsSync()) appDocDir.createSync(recursive: true);
|
||||||
import 'view/screens/settings.dart';
|
final Database database =
|
||||||
|
await databaseFactoryIo.openDatabase(join(appDocDir.path, 'sembast.db'));
|
||||||
|
GetIt.instance.registerSingleton<Database>(database);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> setupSharedPreferences() async {
|
||||||
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
GetIt.instance.registerSingleton<SharedPreferences>(prefs);
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
final Directory appDocDir = await getApplicationDocumentsDirectory();
|
|
||||||
|
|
||||||
if (!appDocDir.existsSync())
|
await Future.wait([
|
||||||
appDocDir.createSync(recursive: true);
|
setupDatabase(),
|
||||||
|
setupSharedPreferences(),
|
||||||
final Database db = await databaseFactoryIo.openDatabase(join(appDocDir.path, 'sembast.db'));
|
]);
|
||||||
|
|
||||||
GetIt.instance.registerSingleton<Database>(db);
|
|
||||||
|
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
|
const MyApp({Key? key}) : super(key: key);
|
||||||
const MyApp({
|
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -44,123 +45,13 @@ class MyApp extends StatelessWidget {
|
|||||||
BlocProvider(create: (context) => ThemeBloc()),
|
BlocProvider(create: (context) => ThemeBloc()),
|
||||||
],
|
],
|
||||||
child: BlocBuilder<ThemeBloc, ThemeState>(
|
child: BlocBuilder<ThemeBloc, ThemeState>(
|
||||||
builder: (context, themeState) {
|
builder: (context, themeState) => MaterialApp(
|
||||||
if (!themeState.prefsAreLoaded) return const SplashScreen();
|
|
||||||
|
|
||||||
return MaterialApp(
|
|
||||||
title: 'Jisho Study Tool',
|
title: 'Jisho Study Tool',
|
||||||
theme: themeState.theme.getMaterialTheme(),
|
theme: themeState.theme.getMaterialTheme(),
|
||||||
initialRoute: '/',
|
initialRoute: '/',
|
||||||
onGenerateRoute: generateRoute,
|
onGenerateRoute: generateRoute,
|
||||||
);
|
),
|
||||||
},
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Page {
|
|
||||||
final Widget content;
|
|
||||||
final Widget titleBar;
|
|
||||||
final BottomNavigationBarItem item;
|
|
||||||
|
|
||||||
const _Page({
|
|
||||||
required this.content,
|
|
||||||
required this.titleBar,
|
|
||||||
required this.item,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
class Home extends StatefulWidget {
|
|
||||||
const Home({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<StatefulWidget> createState() => _HomeState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _HomeState extends State<Home> {
|
|
||||||
int pageNum = 0;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return BlocBuilder<ThemeBloc, ThemeState>(
|
|
||||||
builder: (context, themeState) {
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(
|
|
||||||
title: pages[pageNum].titleBar,
|
|
||||||
centerTitle: true,
|
|
||||||
backgroundColor: AppTheme.jishoGreen.background,
|
|
||||||
foregroundColor: AppTheme.jishoGreen.foreground,
|
|
||||||
),
|
|
||||||
body: Stack(
|
|
||||||
children: [
|
|
||||||
Positioned(
|
|
||||||
right: 30,
|
|
||||||
left: 100,
|
|
||||||
bottom: 30,
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/denshi_jisho_background_overlay.png',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
pages[pageNum].content,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
bottomNavigationBar: BottomNavigationBar(
|
|
||||||
fixedColor: AppTheme.jishoGreen.background,
|
|
||||||
currentIndex: pageNum,
|
|
||||||
onTap: (index) => setState(() {
|
|
||||||
pageNum = index;
|
|
||||||
}),
|
|
||||||
items: pages.map((p) => p.item).toList(),
|
|
||||||
showSelectedLabels: false,
|
|
||||||
showUnselectedLabels: false,
|
|
||||||
unselectedItemColor: themeState.theme.menuGreyDark.background,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<_Page> get pages => [
|
|
||||||
const _Page(
|
|
||||||
content: SearchView(),
|
|
||||||
titleBar: Text('Search'),
|
|
||||||
item: BottomNavigationBarItem(
|
|
||||||
label: 'Search',
|
|
||||||
icon: Icon(Icons.search),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const _Page(
|
|
||||||
content: KanjiView(),
|
|
||||||
titleBar: Text('Kanji'),
|
|
||||||
item: BottomNavigationBarItem(
|
|
||||||
label: 'Kanji',
|
|
||||||
icon: Icon(Mdi.ideogramCjk, size: 30),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const _Page(
|
|
||||||
content: HistoryView(),
|
|
||||||
titleBar: Text('History'),
|
|
||||||
item: BottomNavigationBarItem(
|
|
||||||
label: 'History',
|
|
||||||
icon: Icon(Icons.history),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
_Page(
|
|
||||||
content: Container(),
|
|
||||||
titleBar: const Text('Saved'),
|
|
||||||
item: const BottomNavigationBarItem(
|
|
||||||
label: 'Saved',
|
|
||||||
icon: Icon(Icons.bookmark),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const _Page(
|
|
||||||
content: SettingsView(),
|
|
||||||
titleBar: Text('Settings'),
|
|
||||||
item: BottomNavigationBarItem(
|
|
||||||
label: 'Settings',
|
|
||||||
icon: Icon(Icons.settings),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'main.dart';
|
import 'view/home.dart';
|
||||||
import 'view/screens/search/kanji_result_page.dart';
|
import 'view/screens/search/kanji_result_page.dart';
|
||||||
import 'view/screens/search/search_results_page.dart';
|
import 'view/screens/search/search_results_page.dart';
|
||||||
|
|
||||||
Route<dynamic> generateRoute(RouteSettings settings) {
|
Route<Widget> generateRoute(RouteSettings settings) {
|
||||||
final args = settings.arguments;
|
final args = settings.arguments;
|
||||||
|
|
||||||
switch (settings.name) {
|
switch (settings.name) {
|
||||||
|
@ -13,7 +13,8 @@ class _KanjiBox extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final ColorSet _menuColors = BlocProvider.of<ThemeBloc>(context).state.theme.menuGreyLight;
|
final ColorSet _menuColors =
|
||||||
|
BlocProvider.of<ThemeBloc>(context).state.theme.menuGreyLight;
|
||||||
|
|
||||||
return IntrinsicHeight(
|
return IntrinsicHeight(
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
@ -54,19 +55,23 @@ class KanjiSearchItem extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Slidable(
|
return Slidable(
|
||||||
actionPane: const SlidableScrollActionPane(),
|
endActionPane: ActionPane(
|
||||||
secondaryActions: const [
|
motion: const ScrollMotion(),
|
||||||
IconSlideAction(
|
children: [
|
||||||
caption: 'Favourite',
|
SlidableAction(
|
||||||
color: Colors.yellow,
|
label: 'Favourite',
|
||||||
|
backgroundColor: Colors.yellow,
|
||||||
icon: Icons.star,
|
icon: Icons.star,
|
||||||
|
onPressed: (_) {},
|
||||||
),
|
),
|
||||||
IconSlideAction(
|
SlidableAction(
|
||||||
caption: 'Delete',
|
label: 'Delete',
|
||||||
color: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
icon: Icons.delete,
|
icon: Icons.delete,
|
||||||
|
onPressed: (_) {},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
child: SearchItem(
|
child: SearchItem(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pushNamed(context, '/kanjiSearch', arguments: result.kanji);
|
Navigator.pushNamed(context, '/kanjiSearch', arguments: result.kanji);
|
||||||
|
@ -17,14 +17,19 @@ class PhraseSearchItem extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Slidable(
|
return Slidable(
|
||||||
actionPane: const SlidableScrollActionPane(),
|
endActionPane: ActionPane(
|
||||||
secondaryActions: const [
|
motion: const ScrollMotion(),
|
||||||
IconSlideAction(
|
children: [
|
||||||
caption: 'Delete',
|
|
||||||
color: Colors.red,
|
SlidableAction(
|
||||||
|
label: 'Delete',
|
||||||
|
backgroundColor: Colors.red,
|
||||||
icon: Icons.delete,
|
icon: Icons.delete,
|
||||||
|
onPressed: (_) {},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
),
|
||||||
child: SearchItem(
|
child: SearchItem(
|
||||||
onTap: () => Navigator.pushNamed(
|
onTap: () => Navigator.pushNamed(
|
||||||
context,
|
context,
|
||||||
|
@ -90,7 +90,6 @@ class _KanjiSearchBodyState extends State<KanjiSearchBody>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
AnimatedSizeAndFade(
|
AnimatedSizeAndFade(
|
||||||
vsync: this,
|
|
||||||
fadeDuration: const Duration(milliseconds: 200),
|
fadeDuration: const Duration(milliseconds: 200),
|
||||||
sizeDuration: const Duration(milliseconds: 300),
|
sizeDuration: const Duration(milliseconds: 300),
|
||||||
child: _controller.value == 1
|
child: _controller.value == 1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get_it/get_it.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import '../../../models/themes/theme.dart';
|
import '../../../models/themes/theme.dart';
|
||||||
@ -11,45 +12,40 @@ class LanguageSelector extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LanguageSelectorState extends State<LanguageSelector> {
|
class _LanguageSelectorState extends State<LanguageSelector> {
|
||||||
late final SharedPreferences prefs;
|
final SharedPreferences prefs = GetIt.instance.get<SharedPreferences>();
|
||||||
late List<bool> isSelected;
|
late List<bool> isSelected;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
isSelected = [false, false, false];
|
isSelected = _getSelectedStatus() ?? [false, false, false];
|
||||||
|
|
||||||
SharedPreferences.getInstance().then((prefs) {
|
|
||||||
this.prefs = prefs;
|
|
||||||
setState(() {
|
|
||||||
isSelected = _getSelectedStatus() ?? isSelected;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _updateSelectedStatus() {
|
Future<void> _updateSelectedStatus() async => prefs.setStringList(
|
||||||
prefs.setStringList(
|
|
||||||
'languageSelectorStatus',
|
'languageSelectorStatus',
|
||||||
isSelected.map((b) => b ? '1' : '0').toList(),
|
isSelected.map((b) => b ? '1' : '0').toList(),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
List<bool>? _getSelectedStatus() {
|
List<bool>? _getSelectedStatus() => prefs
|
||||||
return prefs
|
|
||||||
.getStringList('languageSelectorStatus')
|
.getStringList('languageSelectorStatus')
|
||||||
?.map((s) => s == '1')
|
?.map((s) => s == '1')
|
||||||
.toList();
|
.toList();
|
||||||
}
|
|
||||||
|
Widget _languageOption(String language) =>
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
|
||||||
|
child: Center(child: Text(language)),
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ToggleButtons(
|
return ToggleButtons(
|
||||||
selectedColor: AppTheme.jishoGreen.background,
|
selectedColor: AppTheme.jishoGreen.background,
|
||||||
isSelected: isSelected,
|
isSelected: isSelected,
|
||||||
children: const <Widget>[
|
children: <Widget>[
|
||||||
_LanguageOption('Auto'),
|
_languageOption('Auto'),
|
||||||
_LanguageOption('日本語'),
|
_languageOption('日本語'),
|
||||||
_LanguageOption('English')
|
_languageOption('English')
|
||||||
],
|
],
|
||||||
onPressed: (buttonIndex) {
|
onPressed: (buttonIndex) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -62,17 +58,3 @@ class _LanguageSelectorState extends State<LanguageSelector> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LanguageOption extends StatelessWidget {
|
|
||||||
final String language;
|
|
||||||
|
|
||||||
const _LanguageOption(this.language);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
|
|
||||||
child: Center(child: Text(language)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -22,9 +22,7 @@ class SearchBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(height: 10.0),
|
||||||
height: 10.0,
|
|
||||||
),
|
|
||||||
const LanguageSelector()
|
const LanguageSelector()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
114
lib/view/home.dart
Normal file
114
lib/view/home.dart
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mdi/mdi.dart';
|
||||||
|
|
||||||
|
import '../bloc/theme/theme_bloc.dart';
|
||||||
|
import 'screens/history.dart';
|
||||||
|
import 'screens/search/kanji_view.dart';
|
||||||
|
import 'screens/search/search_view.dart';
|
||||||
|
import 'screens/settings.dart';
|
||||||
|
|
||||||
|
class Home extends StatefulWidget {
|
||||||
|
const Home({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() => _HomeState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomeState extends State<Home> {
|
||||||
|
int pageNum = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocBuilder<ThemeBloc, ThemeState>(
|
||||||
|
builder: (context, themeState) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: pages[pageNum].titleBar,
|
||||||
|
centerTitle: true,
|
||||||
|
backgroundColor: AppTheme.jishoGreen.background,
|
||||||
|
foregroundColor: AppTheme.jishoGreen.foreground,
|
||||||
|
),
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
Positioned(
|
||||||
|
right: 30,
|
||||||
|
left: 100,
|
||||||
|
bottom: 30,
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/denshi_jisho_background_overlay.png',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
pages[pageNum].content,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
|
fixedColor: AppTheme.jishoGreen.background,
|
||||||
|
currentIndex: pageNum,
|
||||||
|
onTap: (index) => setState(() {
|
||||||
|
pageNum = index;
|
||||||
|
}),
|
||||||
|
items: pages.map((p) => p.item).toList(),
|
||||||
|
showSelectedLabels: false,
|
||||||
|
showUnselectedLabels: false,
|
||||||
|
unselectedItemColor: themeState.theme.menuGreyDark.background,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<_Page> get pages => [
|
||||||
|
const _Page(
|
||||||
|
content: SearchView(),
|
||||||
|
titleBar: Text('Search'),
|
||||||
|
item: BottomNavigationBarItem(
|
||||||
|
label: 'Search',
|
||||||
|
icon: Icon(Icons.search),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const _Page(
|
||||||
|
content: KanjiView(),
|
||||||
|
titleBar: Text('Kanji'),
|
||||||
|
item: BottomNavigationBarItem(
|
||||||
|
label: 'Kanji',
|
||||||
|
icon: Icon(Mdi.ideogramCjk, size: 30),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const _Page(
|
||||||
|
content: HistoryView(),
|
||||||
|
titleBar: Text('History'),
|
||||||
|
item: BottomNavigationBarItem(
|
||||||
|
label: 'History',
|
||||||
|
icon: Icon(Icons.history),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_Page(
|
||||||
|
content: Container(),
|
||||||
|
titleBar: const Text('Saved'),
|
||||||
|
item: const BottomNavigationBarItem(
|
||||||
|
label: 'Saved',
|
||||||
|
icon: Icon(Icons.bookmark),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const _Page(
|
||||||
|
content: SettingsView(),
|
||||||
|
titleBar: Text('Settings'),
|
||||||
|
item: BottomNavigationBarItem(
|
||||||
|
label: 'Settings',
|
||||||
|
icon: Icon(Icons.settings),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Page {
|
||||||
|
final Widget content;
|
||||||
|
final Widget titleBar;
|
||||||
|
final BottomNavigationBarItem item;
|
||||||
|
|
||||||
|
const _Page({
|
||||||
|
required this.content,
|
||||||
|
required this.titleBar,
|
||||||
|
required this.item,
|
||||||
|
});
|
||||||
|
}
|
@ -17,7 +17,7 @@ class SettingsView extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SettingsViewState extends State<SettingsView> {
|
class _SettingsViewState extends State<SettingsView> {
|
||||||
late final SharedPreferences prefs;
|
final SharedPreferences prefs = GetIt.instance.get<SharedPreferences>();
|
||||||
|
|
||||||
bool darkThemeEnabled = false;
|
bool darkThemeEnabled = false;
|
||||||
bool autoThemeEnabled = false;
|
bool autoThemeEnabled = false;
|
||||||
@ -25,19 +25,8 @@ class _SettingsViewState extends State<SettingsView> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
SharedPreferences.getInstance().then((prefs) {
|
|
||||||
this.prefs = prefs;
|
|
||||||
_getPrefs();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get stored preferences and set setting page state accordingly
|
|
||||||
void _getPrefs() {
|
|
||||||
setState(() {
|
|
||||||
darkThemeEnabled = prefs.getBool('darkThemeEnabled') ?? darkThemeEnabled;
|
darkThemeEnabled = prefs.getBool('darkThemeEnabled') ?? darkThemeEnabled;
|
||||||
autoThemeEnabled = prefs.getBool('autoThemeEnabled') ?? autoThemeEnabled;
|
autoThemeEnabled = prefs.getBool('autoThemeEnabled') ?? autoThemeEnabled;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update stored preferences with values from setting page state
|
/// Update stored preferences with values from setting page state
|
||||||
|
159
pubspec.lock
159
pubspec.lock
@ -7,35 +7,35 @@ packages:
|
|||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "22.0.0"
|
version: "31.0.0"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.2"
|
version: "2.8.0"
|
||||||
animated_size_and_fade:
|
animated_size_and_fade:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: animated_size_and_fade
|
name: animated_size_and_fade
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "3.0.0"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.6"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.0"
|
version: "2.3.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -49,7 +49,7 @@ packages:
|
|||||||
name: bloc
|
name: bloc
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.0"
|
version: "8.0.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -63,7 +63,7 @@ packages:
|
|||||||
name: build
|
name: build
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.1.1"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -77,42 +77,42 @@ packages:
|
|||||||
name: build_daemon
|
name: build_daemon
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "3.0.1"
|
||||||
build_resolvers:
|
build_resolvers:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_resolvers
|
name: build_resolvers
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.4"
|
version: "2.0.5"
|
||||||
build_runner:
|
build_runner:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.6"
|
version: "2.1.5"
|
||||||
build_runner_core:
|
build_runner_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_runner_core
|
name: build_runner_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.1"
|
version: "7.2.2"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_collection
|
name: built_collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.1.0"
|
version: "5.1.1"
|
||||||
built_value:
|
built_value:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_value
|
name: built_value
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.1.1"
|
version: "8.1.3"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -140,7 +140,7 @@ packages:
|
|||||||
name: cli_util
|
name: cli_util
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.3"
|
version: "0.3.5"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -189,14 +189,14 @@ packages:
|
|||||||
name: csslib
|
name: csslib
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.17.0"
|
version: "0.17.1"
|
||||||
dart_style:
|
dart_style:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.2.0"
|
||||||
division:
|
division:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -217,14 +217,14 @@ packages:
|
|||||||
name: ffi
|
name: ffi
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.1.2"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: file
|
name: file
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.0"
|
version: "6.1.2"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -243,7 +243,7 @@ packages:
|
|||||||
name: flutter_bloc
|
name: flutter_bloc
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.2.0"
|
version: "8.0.0"
|
||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@ -257,14 +257,14 @@ packages:
|
|||||||
name: flutter_native_splash
|
name: flutter_native_splash
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.3.2"
|
||||||
flutter_slidable:
|
flutter_slidable:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_slidable
|
name: flutter_slidable
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.0"
|
version: "1.1.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -295,14 +295,14 @@ packages:
|
|||||||
name: glob
|
name: glob
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.2"
|
||||||
graphs:
|
graphs:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: graphs
|
name: graphs
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.1.0"
|
||||||
html:
|
html:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -323,7 +323,7 @@ packages:
|
|||||||
name: http
|
name: http
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.3"
|
version: "0.13.4"
|
||||||
http_multi_server:
|
http_multi_server:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -344,7 +344,7 @@ packages:
|
|||||||
name: image
|
name: image
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.2"
|
version: "3.1.0"
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -365,14 +365,14 @@ packages:
|
|||||||
name: json_annotation
|
name: json_annotation
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.0"
|
version: "4.4.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: logging
|
name: logging
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.2"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -400,7 +400,7 @@ packages:
|
|||||||
name: mime
|
name: mime
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.1"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -414,7 +414,7 @@ packages:
|
|||||||
name: package_config
|
name: package_config
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
path:
|
path:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -428,63 +428,70 @@ packages:
|
|||||||
name: path_provider
|
name: path_provider
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.7"
|
||||||
|
path_provider_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_android
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.9"
|
||||||
|
path_provider_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_ios
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.7"
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_linux
|
name: path_provider_linux
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.1.2"
|
||||||
path_provider_macos:
|
path_provider_macos:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_macos
|
name: path_provider_macos
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.4"
|
||||||
path_provider_platform_interface:
|
path_provider_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_platform_interface
|
name: path_provider_platform_interface
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.1"
|
||||||
path_provider_windows:
|
path_provider_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_windows
|
name: path_provider_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.4"
|
||||||
pedantic:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: pedantic
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.11.0"
|
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: petitparser
|
name: petitparser
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.0"
|
version: "4.4.0"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: platform
|
name: platform
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "3.1.0"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: plugin_platform_interface
|
name: plugin_platform_interface
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.2"
|
||||||
pool:
|
pool:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -498,28 +505,28 @@ packages:
|
|||||||
name: process
|
name: process
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.1"
|
version: "4.2.4"
|
||||||
provider:
|
provider:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: provider
|
name: provider
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.0"
|
version: "6.0.1"
|
||||||
pub_semver:
|
pub_semver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.1.0"
|
||||||
pubspec_parse:
|
pubspec_parse:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pubspec_parse
|
name: pubspec_parse
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.1.0"
|
||||||
sembast:
|
sembast:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -540,21 +547,35 @@ packages:
|
|||||||
name: shared_preferences
|
name: shared_preferences
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.7"
|
version: "2.0.9"
|
||||||
|
shared_preferences_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_android
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.9"
|
||||||
|
shared_preferences_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_ios
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.8"
|
||||||
shared_preferences_linux:
|
shared_preferences_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shared_preferences_linux
|
name: shared_preferences_linux
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.3"
|
||||||
shared_preferences_macos:
|
shared_preferences_macos:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shared_preferences_macos
|
name: shared_preferences_macos
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
shared_preferences_platform_interface:
|
shared_preferences_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -568,14 +589,14 @@ packages:
|
|||||||
name: shared_preferences_web
|
name: shared_preferences_web
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
shared_preferences_windows:
|
shared_preferences_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shared_preferences_windows
|
name: shared_preferences_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.3"
|
||||||
shelf:
|
shelf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -685,21 +706,35 @@ packages:
|
|||||||
name: url_launcher
|
name: url_launcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.10"
|
version: "6.0.17"
|
||||||
|
url_launcher_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_android
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.13"
|
||||||
|
url_launcher_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_ios
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.13"
|
||||||
url_launcher_linux:
|
url_launcher_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_linux
|
name: url_launcher_linux
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
url_launcher_macos:
|
url_launcher_macos:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_macos
|
name: url_launcher_macos
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
url_launcher_platform_interface:
|
url_launcher_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -713,14 +748,14 @@ packages:
|
|||||||
name: url_launcher_web
|
name: url_launcher_web
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.5"
|
||||||
url_launcher_windows:
|
url_launcher_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_windows
|
name: url_launcher_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.2"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -734,7 +769,7 @@ packages:
|
|||||||
name: watcher
|
name: watcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.1"
|
||||||
web_socket_channel:
|
web_socket_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -748,7 +783,7 @@ packages:
|
|||||||
name: win32
|
name: win32
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.5"
|
version: "2.3.1"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -762,7 +797,7 @@ packages:
|
|||||||
name: xml
|
name: xml
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.2.0"
|
version: "5.3.1"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -772,4 +807,4 @@ packages:
|
|||||||
version: "3.1.0"
|
version: "3.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.14.0 <3.0.0"
|
dart: ">=2.14.0 <3.0.0"
|
||||||
flutter: ">=2.0.0"
|
flutter: ">=2.5.0"
|
||||||
|
@ -6,13 +6,13 @@ environment:
|
|||||||
sdk: ">=2.12.0 <3.0.0"
|
sdk: ">=2.12.0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
animated_size_and_fade: ^2.0.0
|
animated_size_and_fade: ^3.0.0
|
||||||
confirm_dialog: ^1.0.0
|
confirm_dialog: ^1.0.0
|
||||||
division: ^0.9.0
|
division: ^0.9.0
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_bloc: ^7.0.1
|
flutter_bloc: ^8.0.0
|
||||||
flutter_slidable: ^0.6.0
|
flutter_slidable: ^1.1.0
|
||||||
get_it: ^7.2.0
|
get_it: ^7.2.0
|
||||||
mdi: ^5.0.0-nullsafety.0
|
mdi: ^5.0.0-nullsafety.0
|
||||||
path: ^1.8.0
|
path: ^1.8.0
|
||||||
|
Loading…
Reference in New Issue
Block a user