From b82b9b20a1cbedf1e3f638db9fb02d529dd99624 Mon Sep 17 00:00:00 2001 From: qixiao Date: Sun, 13 Oct 2024 14:48:12 +0800 Subject: [PATCH] feat: allow user to adjust font size on reader screen --- .../screen/reader/reader_screen_bloc.dart | 19 +++ .../screen/reader/reader_screen_event.dart | 9 ++ .../screen/reader/reader_screen_state.dart | 5 + .../entity/app_configuration_entity.dart | 5 + .../entity/app_configuration_entity.g.dart | 129 ++++++++++++++++-- .../app_configuration_entity_adapter.dart | 2 + .../repository/model/app_configuration.dart | 5 + lib/l10n/app_zh.arb | 3 +- lib/l10n/app_zh_hant_hk.arb | 3 +- lib/l10n/app_zh_hant_tw.arb | 3 +- lib/misc/constant.dart | 2 + lib/ui/screens/reader/bottom_bar.dart | 6 + .../reader/chapter_content_scroll.dart | 28 +++- lib/ui/screens/reader/reader_screen.dart | 18 +++ lib/ui/screens/reader/settings_sheet.dart | 59 ++++++++ 15 files changed, 277 insertions(+), 19 deletions(-) create mode 100644 lib/ui/screens/reader/settings_sheet.dart diff --git a/lib/bloc/screen/reader/reader_screen_bloc.dart b/lib/bloc/screen/reader/reader_screen_bloc.dart index 9ce74f2..923ccd4 100644 --- a/lib/bloc/screen/reader/reader_screen_bloc.dart +++ b/lib/bloc/screen/reader/reader_screen_bloc.dart @@ -3,6 +3,7 @@ import 'package:isar/isar.dart'; import 'package:masiro/bloc/screen/reader/reader_screen_event.dart'; import 'package:masiro/bloc/screen/reader/reader_screen_state.dart'; import 'package:masiro/bloc/util/event_transformer.dart'; +import 'package:masiro/data/repository/app_configuration_repository.dart'; import 'package:masiro/data/repository/masiro_repository.dart'; import 'package:masiro/data/repository/model/chapter_detail.dart'; import 'package:masiro/data/repository/model/chapter_record.dart'; @@ -15,6 +16,7 @@ import 'package:masiro/di/get_it.dart'; class ReaderScreenBloc extends Bloc { final masiroRepository = getIt(); final novelRecordRepository = getIt(); + final appConfigurationRepository = getIt(); final int novelId; @@ -28,6 +30,7 @@ class ReaderScreenBloc extends Bloc { transformer: debounce(const Duration(milliseconds: 500)), ); on(_onReaderScreenChapterNavigated); + on(_onReaderScreenFontSizeChanged); } Future _onRequestReaderScreenChapterDetail( @@ -44,10 +47,12 @@ class ReaderScreenBloc extends Bloc { chapterId, ReadingMode.scroll, ); + final appConfig = await appConfigurationRepository.getAppConfiguration(); emit( ReaderScreenLoadedState( chapterDetail: chapterDetail, position: chapterRecord?.position ?? startPosition, + fontSize: appConfig.fontSize, ), ); } catch (e) { @@ -104,6 +109,20 @@ class ReaderScreenBloc extends Bloc { add(ReaderScreenChapterDetailRequested(chapterId: event.chapterId)); } + Future _onReaderScreenFontSizeChanged( + ReaderScreenFontSizeChanged event, + Emitter emit, + ) async { + if (state is! ReaderScreenLoadedState) { + return; + } + final appConfig = await appConfigurationRepository.getAppConfiguration(); + final nextAppConfig = appConfig.copyWith(fontSize: event.fontSize); + await appConfigurationRepository.putAppConfiguration(nextAppConfig); + final loadedState = state as ReaderScreenLoadedState; + emit(loadedState.copyWith(fontSize: event.fontSize)); + } + Future purchasePaidChapter(PaymentInfo paymentInfo) async { if (state is! ReaderScreenLoadedState) { throw Exception( diff --git a/lib/bloc/screen/reader/reader_screen_event.dart b/lib/bloc/screen/reader/reader_screen_event.dart index d7a2a85..e41fc01 100644 --- a/lib/bloc/screen/reader/reader_screen_event.dart +++ b/lib/bloc/screen/reader/reader_screen_event.dart @@ -34,3 +34,12 @@ final class ReaderScreenChapterNavigated extends ReaderScreenEvent { @override List get props => [chapterId]; } + +final class ReaderScreenFontSizeChanged extends ReaderScreenEvent { + final int fontSize; + + ReaderScreenFontSizeChanged({required this.fontSize}); + + @override + List get props => [fontSize]; +} diff --git a/lib/bloc/screen/reader/reader_screen_state.dart b/lib/bloc/screen/reader/reader_screen_state.dart index 5f496b4..3d31b21 100644 --- a/lib/bloc/screen/reader/reader_screen_state.dart +++ b/lib/bloc/screen/reader/reader_screen_state.dart @@ -26,6 +26,7 @@ class ReaderScreenLoadedState extends ReaderScreenState { final ReadingMode readingMode; final ReadPosition position; final LoadingStatus loadingStatus; + final int fontSize; ReaderScreenLoadedState({ required this.chapterDetail, @@ -33,6 +34,7 @@ class ReaderScreenLoadedState extends ReaderScreenState { this.readingMode = ReadingMode.scroll, required this.position, this.loadingStatus = LoadingStatus.success, + required this.fontSize, }); ReaderScreenLoadedState copyWith({ @@ -41,6 +43,7 @@ class ReaderScreenLoadedState extends ReaderScreenState { ReadingMode? readingMode, ReadPosition? position, LoadingStatus? loadingStatus, + int? fontSize, }) { return ReaderScreenLoadedState( chapterDetail: chapterDetail ?? this.chapterDetail, @@ -48,6 +51,7 @@ class ReaderScreenLoadedState extends ReaderScreenState { readingMode: readingMode ?? this.readingMode, position: position ?? this.position, loadingStatus: loadingStatus ?? this.loadingStatus, + fontSize: fontSize ?? this.fontSize, ); } @@ -58,5 +62,6 @@ class ReaderScreenLoadedState extends ReaderScreenState { readingMode, position, loadingStatus, + fontSize, ]; } diff --git a/lib/data/database/entity/app_configuration_entity.dart b/lib/data/database/entity/app_configuration_entity.dart index bdaabc0..2512e0e 100644 --- a/lib/data/database/entity/app_configuration_entity.dart +++ b/lib/data/database/entity/app_configuration_entity.dart @@ -17,12 +17,15 @@ class AppConfigurationEntity { int themeColor; + int fontSize; + AppConfigurationEntity({ this.id = Isar.autoIncrement, required this.dbVersion, this.lastSignInTime = 0, this.themeMode = ThemeMode.system, this.themeColor = defaultThemeColor, + this.fontSize = defaultFontSize, }); AppConfigurationEntity copyWith({ @@ -31,6 +34,7 @@ class AppConfigurationEntity { int? lastSignInTime, ThemeMode? themeMode, int? themeColor, + int? fontSize, }) { return AppConfigurationEntity( id: id ?? this.id, @@ -38,6 +42,7 @@ class AppConfigurationEntity { lastSignInTime: lastSignInTime ?? this.lastSignInTime, themeMode: themeMode ?? this.themeMode, themeColor: themeColor ?? this.themeColor, + fontSize: fontSize ?? this.fontSize, ); } } diff --git a/lib/data/database/entity/app_configuration_entity.g.dart b/lib/data/database/entity/app_configuration_entity.g.dart index cc29913..7f2bf37 100644 --- a/lib/data/database/entity/app_configuration_entity.g.dart +++ b/lib/data/database/entity/app_configuration_entity.g.dart @@ -23,18 +23,23 @@ const AppConfigurationEntitySchema = CollectionSchema( name: r'dbVersion', type: IsarType.long, ), - r'lastSignInTime': PropertySchema( + r'fontSize': PropertySchema( id: 1, + name: r'fontSize', + type: IsarType.long, + ), + r'lastSignInTime': PropertySchema( + id: 2, name: r'lastSignInTime', type: IsarType.long, ), r'themeColor': PropertySchema( - id: 2, + id: 3, name: r'themeColor', type: IsarType.long, ), r'themeMode': PropertySchema( - id: 3, + id: 4, name: r'themeMode', type: IsarType.string, enumMap: _AppConfigurationEntitythemeModeEnumValueMap, @@ -71,9 +76,10 @@ void _appConfigurationEntitySerialize( Map> allOffsets, ) { writer.writeLong(offsets[0], object.dbVersion); - writer.writeLong(offsets[1], object.lastSignInTime); - writer.writeLong(offsets[2], object.themeColor); - writer.writeString(offsets[3], object.themeMode.name); + writer.writeLong(offsets[1], object.fontSize); + writer.writeLong(offsets[2], object.lastSignInTime); + writer.writeLong(offsets[3], object.themeColor); + writer.writeString(offsets[4], object.themeMode.name); } AppConfigurationEntity _appConfigurationEntityDeserialize( @@ -84,11 +90,12 @@ AppConfigurationEntity _appConfigurationEntityDeserialize( ) { final object = AppConfigurationEntity( dbVersion: reader.readLong(offsets[0]), + fontSize: reader.readLongOrNull(offsets[1]) ?? defaultFontSize, id: id, - lastSignInTime: reader.readLongOrNull(offsets[1]) ?? 0, - themeColor: reader.readLongOrNull(offsets[2]) ?? defaultThemeColor, + lastSignInTime: reader.readLongOrNull(offsets[2]) ?? 0, + themeColor: reader.readLongOrNull(offsets[3]) ?? defaultThemeColor, themeMode: _AppConfigurationEntitythemeModeValueEnumMap[ - reader.readStringOrNull(offsets[3])] ?? + reader.readStringOrNull(offsets[4])] ?? ThemeMode.system, ); return object; @@ -104,10 +111,12 @@ P _appConfigurationEntityDeserializeProp

( case 0: return (reader.readLong(offset)) as P; case 1: - return (reader.readLongOrNull(offset) ?? 0) as P; + return (reader.readLongOrNull(offset) ?? defaultFontSize) as P; case 2: - return (reader.readLongOrNull(offset) ?? defaultThemeColor) as P; + return (reader.readLongOrNull(offset) ?? 0) as P; case 3: + return (reader.readLongOrNull(offset) ?? defaultThemeColor) as P; + case 4: return (_AppConfigurationEntitythemeModeValueEnumMap[ reader.readStringOrNull(offset)] ?? ThemeMode.system) as P; @@ -280,6 +289,62 @@ extension AppConfigurationEntityQueryFilter on QueryBuilder< }); } + QueryBuilder fontSizeEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'fontSize', + value: value, + )); + }); + } + + QueryBuilder fontSizeGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'fontSize', + value: value, + )); + }); + } + + QueryBuilder fontSizeLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'fontSize', + value: value, + )); + }); + } + + QueryBuilder fontSizeBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'fontSize', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + QueryBuilder idEqualTo(Id value) { return QueryBuilder.apply(this, (query) { @@ -609,6 +674,20 @@ extension AppConfigurationEntityQuerySortBy }); } + QueryBuilder + sortByFontSize() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'fontSize', Sort.asc); + }); + } + + QueryBuilder + sortByFontSizeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'fontSize', Sort.desc); + }); + } + QueryBuilder sortByLastSignInTime() { return QueryBuilder.apply(this, (query) { @@ -668,6 +747,20 @@ extension AppConfigurationEntityQuerySortThenBy on QueryBuilder< }); } + QueryBuilder + thenByFontSize() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'fontSize', Sort.asc); + }); + } + + QueryBuilder + thenByFontSizeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'fontSize', Sort.desc); + }); + } + QueryBuilder thenById() { return QueryBuilder.apply(this, (query) { @@ -734,6 +827,13 @@ extension AppConfigurationEntityQueryWhereDistinct }); } + QueryBuilder + distinctByFontSize() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'fontSize'); + }); + } + QueryBuilder distinctByLastSignInTime() { return QueryBuilder.apply(this, (query) { @@ -771,6 +871,13 @@ extension AppConfigurationEntityQueryProperty on QueryBuilder< }); } + QueryBuilder + fontSizeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'fontSize'); + }); + } + QueryBuilder lastSignInTimeProperty() { return QueryBuilder.apply(this, (query) { diff --git a/lib/data/repository/adapter/app_configuration_entity_adapter.dart b/lib/data/repository/adapter/app_configuration_entity_adapter.dart index 9075910..597be85 100644 --- a/lib/data/repository/adapter/app_configuration_entity_adapter.dart +++ b/lib/data/repository/adapter/app_configuration_entity_adapter.dart @@ -8,6 +8,7 @@ AppConfiguration appConfigurationEntityToModel(AppConfigurationEntity entity) { lastSignInTime: entity.lastSignInTime, themeMode: entity.themeMode, themeColor: entity.themeColor, + fontSize: entity.fontSize, ); } @@ -18,5 +19,6 @@ AppConfigurationEntity appConfigurationToEntity(AppConfiguration config) { lastSignInTime: config.lastSignInTime, themeMode: config.themeMode, themeColor: config.themeColor, + fontSize: config.fontSize, ); } diff --git a/lib/data/repository/model/app_configuration.dart b/lib/data/repository/model/app_configuration.dart index 65c767f..64a4b4b 100644 --- a/lib/data/repository/model/app_configuration.dart +++ b/lib/data/repository/model/app_configuration.dart @@ -8,6 +8,7 @@ class AppConfiguration extends Equatable { final int lastSignInTime; final ThemeMode themeMode; final int themeColor; + final int fontSize; const AppConfiguration({ required this.id, @@ -15,6 +16,7 @@ class AppConfiguration extends Equatable { required this.lastSignInTime, required this.themeMode, required this.themeColor, + required this.fontSize, }); AppConfiguration copyWith({ @@ -23,6 +25,7 @@ class AppConfiguration extends Equatable { int? lastSignInTime, ThemeMode? themeMode, int? themeColor, + int? fontSize, }) { return AppConfiguration( id: id ?? this.id, @@ -30,6 +33,7 @@ class AppConfiguration extends Equatable { lastSignInTime: lastSignInTime ?? this.lastSignInTime, themeMode: themeMode ?? this.themeMode, themeColor: themeColor ?? this.themeColor, + fontSize: fontSize ?? this.fontSize, ); } @@ -40,5 +44,6 @@ class AppConfiguration extends Equatable { lastSignInTime, themeMode, themeColor, + fontSize, ]; } diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 81df0d5..7fd5914 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -63,5 +63,6 @@ "currentVersion": "当前版本", "projectHomepage": "项目主页", "websiteHomepage": "网站主页", - "copied": "已复制" + "copied": "已复制", + "fontSize": "字体大小" } \ No newline at end of file diff --git a/lib/l10n/app_zh_hant_hk.arb b/lib/l10n/app_zh_hant_hk.arb index 81df0d5..7fd5914 100644 --- a/lib/l10n/app_zh_hant_hk.arb +++ b/lib/l10n/app_zh_hant_hk.arb @@ -63,5 +63,6 @@ "currentVersion": "当前版本", "projectHomepage": "项目主页", "websiteHomepage": "网站主页", - "copied": "已复制" + "copied": "已复制", + "fontSize": "字体大小" } \ No newline at end of file diff --git a/lib/l10n/app_zh_hant_tw.arb b/lib/l10n/app_zh_hant_tw.arb index 81df0d5..7fd5914 100644 --- a/lib/l10n/app_zh_hant_tw.arb +++ b/lib/l10n/app_zh_hant_tw.arb @@ -63,5 +63,6 @@ "currentVersion": "当前版本", "projectHomepage": "项目主页", "websiteHomepage": "网站主页", - "copied": "已复制" + "copied": "已复制", + "fontSize": "字体大小" } \ No newline at end of file diff --git a/lib/misc/constant.dart b/lib/misc/constant.dart index 5ff719f..15950b7 100644 --- a/lib/misc/constant.dart +++ b/lib/misc/constant.dart @@ -3,3 +3,5 @@ const coverRatio = 7 / 10; const defaultThemeColor = 0xFF6750A4; const projectHomepage = 'https://github.com/qixiaoo/masiro'; + +const defaultFontSize = 14; diff --git a/lib/ui/screens/reader/bottom_bar.dart b/lib/ui/screens/reader/bottom_bar.dart index 976dd07..61db867 100644 --- a/lib/ui/screens/reader/bottom_bar.dart +++ b/lib/ui/screens/reader/bottom_bar.dart @@ -12,6 +12,7 @@ class BottomBar extends StatelessWidget { final int? nextChapterId; final void Function(int chapterId) onNavigateTo; + final void Function() onSettingsClicked; const BottomBar({ super.key, @@ -19,6 +20,7 @@ class BottomBar extends StatelessWidget { this.prevChapterId, this.nextChapterId, required this.onNavigateTo, + required this.onSettingsClicked, }); @override @@ -53,6 +55,10 @@ class BottomBar extends StatelessWidget { : () => onNavigateTo(prevChapterId!), icon: const Icon(Icons.skip_previous_rounded), ), + IconButton( + onPressed: onSettingsClicked, + icon: const Icon(Icons.settings_rounded), + ), IconButton( onPressed: nextChapterId == null ? null diff --git a/lib/ui/screens/reader/chapter_content_scroll.dart b/lib/ui/screens/reader/chapter_content_scroll.dart index a1033b1..cbc6f80 100644 --- a/lib/ui/screens/reader/chapter_content_scroll.dart +++ b/lib/ui/screens/reader/chapter_content_scroll.dart @@ -11,6 +11,7 @@ class ChapterContentScroll extends StatefulWidget { final EdgeInsets? padding; final ReadPosition position; final void Function(ReadPosition position)? onPositionChange; + final int fontSize; const ChapterContentScroll({ super.key, @@ -18,6 +19,7 @@ class ChapterContentScroll extends StatefulWidget { this.padding, this.position = startPosition, this.onPositionChange, + required this.fontSize, }); @override @@ -28,6 +30,8 @@ class _ChapterContentScrollState extends State { late final ItemScrollController itemScrollController; late final ItemPositionsListener itemPositionsListener; + late TextStyle style; + late (int, double) Function() getScrollListInitialPosition; @override @@ -44,6 +48,24 @@ class _ChapterContentScrollState extends State { ); } + @override + void didChangeDependencies() { + super.didChangeDependencies(); + + final defaultTextStyle = DefaultTextStyle.of(context).style; + style = defaultTextStyle.copyWith(fontSize: widget.fontSize.toDouble()); + } + + @override + void didUpdateWidget(covariant ChapterContentScroll oldWidget) { + super.didUpdateWidget(oldWidget); + + if (oldWidget.fontSize != widget.fontSize) { + final defaultTextStyle = DefaultTextStyle.of(context).style; + style = defaultTextStyle.copyWith(fontSize: widget.fontSize.toDouble()); + } + } + @override void dispose() { itemPositionsListener.itemPositions.removeListener(_onItemPositionsChange); @@ -69,7 +91,7 @@ class _ChapterContentScrollState extends State { itemBuilder: (BuildContext context, int index) { final e = elements[index]; return switch (e) { - TextContent() => Text(e.text), + TextContent() => Text(e.text, style: style), ImageContent() => CachedImage( url: e.src, width: windowSize.width, @@ -93,8 +115,6 @@ class _ChapterContentScrollState extends State { case ImageContent(): return (index, position.elementTopOffset / height); case TextContent(): - // TODO(qixiaoo): Make text style configurable - final style = DefaultTextStyle.of(context).style; final topOffset = getTextElementTopOffset( element.text, style, @@ -149,8 +169,6 @@ class _ChapterContentScrollState extends State { } if (firstVisibleItemContent is TextContent) { - // TODO(qixiaoo): Make text style configurable - final style = DefaultTextStyle.of(context).style; final elementCharacterIndex = getFirstVisibleCharacterIndex( firstVisibleItemContent.text, style, diff --git a/lib/ui/screens/reader/reader_screen.dart b/lib/ui/screens/reader/reader_screen.dart index c355fad..36a5eca 100644 --- a/lib/ui/screens/reader/reader_screen.dart +++ b/lib/ui/screens/reader/reader_screen.dart @@ -9,6 +9,7 @@ import 'package:masiro/misc/platform.dart'; import 'package:masiro/ui/screens/reader/bottom_bar.dart'; import 'package:masiro/ui/screens/reader/chapter_content_scroll.dart'; import 'package:masiro/ui/screens/reader/payment_detail.dart'; +import 'package:masiro/ui/screens/reader/settings_sheet.dart'; import 'package:masiro/ui/screens/reader/top_bar.dart'; import 'package:masiro/ui/widgets/error_message.dart'; @@ -71,6 +72,7 @@ class _ReaderScreenState extends State { final bloc = context.read(); final chapterDetail = state.chapterDetail; final isHudVisible = state.isHudVisible; + final fontSize = state.fontSize; final volumes = chapterDetail.volumes; final chapterId = chapterDetail.chapterId; @@ -93,6 +95,20 @@ class _ReaderScreenState extends State { _lastReadChapterIdForPopResult = chapterId; bloc.add(ReaderScreenChapterNavigated(chapterId: chapterId)); }, + onSettingsClicked: () { + showModalBottomSheet( + showDragHandle: true, + context: context, + builder: (BuildContext context) { + return SettingsSheet( + fontSize: fontSize, + onFontSizeChanged: (v) { + bloc.add(ReaderScreenFontSizeChanged(fontSize: v)); + }, + ); + }, + ); + }, ), ], ); @@ -106,6 +122,7 @@ class _ReaderScreenState extends State { final chapterDetail = state.chapterDetail; final paymentInfo = chapterDetail.paymentInfo; final loadingStatus = state.loadingStatus; + final fontSize = state.fontSize; if (loadingStatus.isLoading()) { return const Center( @@ -121,6 +138,7 @@ class _ReaderScreenState extends State { paymentInfo != null ? PaymentDetail(paymentInfo: paymentInfo) : null; final scrollReader = ChapterContentScroll( + fontSize: fontSize, content: chapterDetail.content, padding: isDesktop ? const EdgeInsets.symmetric( diff --git a/lib/ui/screens/reader/settings_sheet.dart b/lib/ui/screens/reader/settings_sheet.dart new file mode 100644 index 0000000..eb6d7e6 --- /dev/null +++ b/lib/ui/screens/reader/settings_sheet.dart @@ -0,0 +1,59 @@ +import 'package:flutter/material.dart'; +import 'package:masiro/misc/context.dart'; + +class SettingsSheet extends StatefulWidget { + final int fontSize; + final void Function(int fontSize) onFontSizeChanged; + + const SettingsSheet({ + super.key, + required this.fontSize, + required this.onFontSizeChanged, + }); + + @override + State createState() => _SettingsSheetState(); +} + +class _SettingsSheetState extends State { + late int fontSize; + + @override + void initState() { + super.initState(); + fontSize = widget.fontSize; + } + + @override + Widget build(BuildContext context) { + final localizations = context.localizations(); + + return Container( + width: double.infinity, + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text(localizations.fontSize), + Expanded( + child: Slider( + value: fontSize.toDouble(), + min: 12, + max: 32, + divisions: 20, + label: fontSize.toString(), + onChanged: (value) { + setState(() => fontSize = value.toInt()); + widget.onFontSizeChanged(value.toInt()); + }, + ), + ), + ], + ), + ], + ), + ); + } +}