From 4e2c82b600fbbbfcfc416cf9fd71c0b7b51aa3db Mon Sep 17 00:00:00 2001 From: Daniel Poss Date: Mon, 24 Mar 2025 23:56:13 -0500 Subject: [PATCH 1/4] Add API call state management and update EventsListWidget to accept clashStore --- lib/enums/api_call_state.dart | 6 + lib/pages/home/page/home_v2.dart | 6 +- .../home/page/widgets/calendar_widget.dart | 153 +++++++--- .../home/page/widgets/events_widget.dart | 19 +- lib/stores/v2-stores/clash.store.dart | 41 ++- lib/storybook/calendar_widget_storybook.dart | 184 +++++++++++ lib/storybook_main.dart | 287 ++++++++---------- 7 files changed, 475 insertions(+), 221 deletions(-) create mode 100644 lib/enums/api_call_state.dart create mode 100644 lib/storybook/calendar_widget_storybook.dart diff --git a/lib/enums/api_call_state.dart b/lib/enums/api_call_state.dart new file mode 100644 index 0000000..ccf39fc --- /dev/null +++ b/lib/enums/api_call_state.dart @@ -0,0 +1,6 @@ +enum ApiCallState { + idle, + loading, + success, + error, +} diff --git a/lib/pages/home/page/home_v2.dart b/lib/pages/home/page/home_v2.dart index c29c596..217d445 100644 --- a/lib/pages/home/page/home_v2.dart +++ b/lib/pages/home/page/home_v2.dart @@ -133,9 +133,9 @@ class _HomeV2State extends State { ), ]), ), - const Flexible( + Flexible( flex: 2, - child: EventsListWidget(), + child: EventsListWidget(clashStore: clashStore), ), ], ); @@ -148,7 +148,7 @@ class _HomeV2State extends State { selectedDay: _selectedDay, clashStore: clashStore, discordDetailsStore: discordDetailsStore), - EventsListWidget(), + EventsListWidget(clashStore: clashStore), ], ); } diff --git a/lib/pages/home/page/widgets/calendar_widget.dart b/lib/pages/home/page/widgets/calendar_widget.dart index 9619844..13488b7 100644 --- a/lib/pages/home/page/widgets/calendar_widget.dart +++ b/lib/pages/home/page/widgets/calendar_widget.dart @@ -1,3 +1,4 @@ +import 'package:clashbot_flutter/enums/api_call_state.dart'; import 'package:clashbot_flutter/pages/home/page/home_v2.dart'; import 'package:clashbot_flutter/pages/shimmer_loading_page.dart'; import 'package:clashbot_flutter/stores/discord_details.store.dart'; @@ -5,6 +6,8 @@ import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:intl/intl.dart'; +import 'package:mobx/mobx.dart'; +import 'package:provider/provider.dart'; import 'package:table_calendar/table_calendar.dart'; /// This widget requires the following providers: @@ -61,36 +64,39 @@ class _CalendarWidgetState extends State { Widget build(BuildContext context) { bool isDarkMode = Theme.of(context).brightness == Brightness.dark; return Observer( - builder: (_) => widget.clashStore.isRefreshingData - ? SizedBox( - width: 1000.0, child: LoadingCalendar(focusedDay: _focusedDay)) - : SizedBox( - width: 1000.0, - child: Container( - padding: const EdgeInsets.all(16.0), - child: Column( - children: [ - CalendarHeader( - focusedDay: _focusedDay, - onMonthChanged: onMonthChanged, - ), - CalendarBody( - focusedDay: _focusedDay, - hoveredDay: _hoveredDay, - isDarkMode: isDarkMode, - discordDetailsStore: widget.discordDetailsStore, - clashStore: widget.clashStore, - onDaySelected: onDaySelected, - onHoveredDayChanged: (day) { - setState(() { - _hoveredDay = day; - }); - }, + builder: (_) => + widget.clashStore.tournamentsApiCallState == ApiCallState.loading + ? SizedBox( + width: 1000.0, + child: LoadingCalendar(focusedDay: _focusedDay)) + : SizedBox( + width: 1000.0, + child: Container( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + CalendarHeader( + focusedDay: _focusedDay, + onMonthChanged: onMonthChanged, + clashStore: widget.clashStore, + ), + CalendarBody( + focusedDay: _focusedDay, + hoveredDay: _hoveredDay, + isDarkMode: isDarkMode, + discordDetailsStore: widget.discordDetailsStore, + clashStore: widget.clashStore, + onDaySelected: onDaySelected, + onHoveredDayChanged: (day) { + setState(() { + _hoveredDay = day; + }); + }, + ), + ], ), - ], - ), - ), - )); + ), + )); } } @@ -142,36 +148,83 @@ class LoadingCalendar extends StatelessWidget { class CalendarHeader extends StatelessWidget { final DateTime focusedDay; final ValueChanged onMonthChanged; + final ClashStore clashStore; const CalendarHeader({ Key? key, required this.focusedDay, required this.onMonthChanged, + required this.clashStore, }) : super(key: key); @override Widget build(BuildContext context) { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - IconButton( - icon: Icon(Icons.arrow_back), - onPressed: () { - onMonthChanged(DateTime(focusedDay.year, focusedDay.month - 1)); - }, - ), - Text( - DateFormat('MMMM yyyy').format(focusedDay), - style: const TextStyle(fontSize: 20.0), - ), - IconButton( - icon: const Icon(Icons.arrow_forward), - onPressed: () { - onMonthChanged(DateTime(focusedDay.year, focusedDay.month + 1)); - }, - ), - ], - ); + return Observer(builder: (_) { + InputChip chip; + switch (clashStore.tournamentsApiCallState) { + case ApiCallState.loading: + chip = InputChip( + label: const CircularProgressIndicator(), + backgroundColor: Theme.of(context).colorScheme.secondary, + tooltip: 'Loading...', + ); + case ApiCallState.success: + chip = InputChip( + label: const Icon(Icons.check), + backgroundColor: Theme.of(context).colorScheme.primary, + tooltip: "Data up to date", + ); + break; + case ApiCallState.error: + chip = InputChip( + label: const Icon(Icons.refresh), + onPressed: () { + clashStore + .refreshClashTournaments(clashStore.clashBotUser.discordId!); + }, + backgroundColor: Theme.of(context).colorScheme.error, + tooltip: 'Data failed to load, tap to retry', + ); + break; + default: + chip = InputChip( + label: const Text('N/A'), + onPressed: () {}, + backgroundColor: Theme.of(context).colorScheme.onSurface, + tooltip: 'N/A', + ); + break; + } + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + onMonthChanged(DateTime(focusedDay.year, focusedDay.month - 1)); + }, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 10, + children: [ + Text( + DateFormat('MMMM yyyy').format(focusedDay), + style: const TextStyle(fontSize: 20.0), + ), + chip, + ], + ), + IconButton( + icon: const Icon(Icons.arrow_forward), + onPressed: () { + onMonthChanged(DateTime(focusedDay.year, focusedDay.month + 1)); + }, + ), + ], + ); + }); } } diff --git a/lib/pages/home/page/widgets/events_widget.dart b/lib/pages/home/page/widgets/events_widget.dart index 848d72f..9416b52 100644 --- a/lib/pages/home/page/widgets/events_widget.dart +++ b/lib/pages/home/page/widgets/events_widget.dart @@ -4,14 +4,13 @@ import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:intl/intl.dart'; -import 'package:provider/provider.dart'; class EventsListWidget extends StatelessWidget { - const EventsListWidget({super.key}); + final ClashStore clashStore; + const EventsListWidget({super.key, required this.clashStore}); @override Widget build(BuildContext context) { - ClashStore clashStore = context.read(); final DateFormat formatter = DateFormat('yyyy-MM-ddTHH:mm:ssZ'); return Observer(builder: (_) { var events = @@ -19,16 +18,16 @@ class EventsListWidget extends StatelessWidget { return SingleChildScrollView( child: ListView.builder( shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), + physics: const BouncingScrollPhysics(), itemCount: clashStore.tournamentsToTeams.entries.length, itemBuilder: (context, index) { if (clashStore.filterByDay && events[index].value.isEmpty) { - return SizedBox.shrink(); + return const SizedBox.shrink(); } return EventTile( event: { - 'title': events[index].key.tournamentName + - events[index].key.tournamentDay, + 'title': events[index].key.tournamentName, + 'day': events[index].key.tournamentDay, 'date': formatter.format(events[index].key.startTime.toLocal()), 'startTime': formatter.format(events[index].key.startTime.toLocal()), @@ -64,7 +63,11 @@ class EventTile extends StatelessWidget { event['title']!, style: Theme.of(context).textTheme.headlineSmall, ), - initiallyExpanded: true, + initiallyExpanded: eventTeams.isNotEmpty, + trailing: Text( + event['day']!, + style: Theme.of(context).textTheme.headlineSmall, + ), subtitle: Wrap( spacing: 10, direction: Axis.horizontal, diff --git a/lib/stores/v2-stores/clash.store.dart b/lib/stores/v2-stores/clash.store.dart index 16fd807..ca0c2e0 100644 --- a/lib/stores/v2-stores/clash.store.dart +++ b/lib/stores/v2-stores/clash.store.dart @@ -1,4 +1,5 @@ import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; import 'package:clashbot_flutter/models/clash_team.dart'; import 'package:clashbot_flutter/models/clash_tournament.dart'; import 'package:clashbot_flutter/models/clashbot_user.dart'; @@ -59,6 +60,30 @@ abstract class _ClashStore with Store { @observable bool failedToLoad = false; + @observable + ApiCallState tournamentsApiCallState = ApiCallState.idle; + + @observable + ApiCallState teamsApiCallState = ApiCallState.idle; + + @observable + ApiCallState userApiCallState = ApiCallState.idle; + + @action + void setTournamentsApiCallState(ApiCallState state) { + tournamentsApiCallState = state; + } + + @action + void setTeamsApiCallState(ApiCallState state) { + teamsApiCallState = state; + } + + @action + void setUserApiCallState(ApiCallState state) { + userApiCallState = state; + } + @action void loadingUserDetailsFailed() { failedToLoad = true; @@ -87,13 +112,14 @@ abstract class _ClashStore with Store { @action Future refreshClashBotUser(String id) async { refreshingUser = true; - userDetailsSuccessfullyLoaded(); addCallInProgress(_ClashStore.refreshClashBotUserCall); + setUserApiCallState(ApiCallState.loading); try { clashBotUser = await _clashService.getPlayer(id); setSelectedServer(clashBotUser.selectedServers); + setUserApiCallState(ApiCallState.success); } catch (e) { - loadingUserDetailsFailed(); + setUserApiCallState(ApiCallState.error); } removeCallInProgress(_ClashStore.refreshClashBotUserCall); refreshingUser = false; @@ -214,8 +240,15 @@ abstract class _ClashStore with Store { Future refreshClashTeams( String id, List preferredServers) async { addCallInProgress(_ClashStore.refreshClashTeamsCall); - var futureClashTeams = - await _clashService.getClashTeams(id, preferredServers); + setTeamsApiCallState(ApiCallState.loading); + var futureClashTeams; + try { + futureClashTeams = + await _clashService.getClashTeams(id, preferredServers); + setTeamsApiCallState(ApiCallState.success); + } catch (e) { + setTeamsApiCallState(ApiCallState.error); + } clashTeams = ObservableList.of(futureClashTeams); removeCallInProgress(_ClashStore.refreshClashTeamsCall); } diff --git a/lib/storybook/calendar_widget_storybook.dart b/lib/storybook/calendar_widget_storybook.dart new file mode 100644 index 0000000..a51bd56 --- /dev/null +++ b/lib/storybook/calendar_widget_storybook.dart @@ -0,0 +1,184 @@ +import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; +import 'package:clashbot_flutter/models/clash_team.dart'; +import 'package:clashbot_flutter/models/clash_tournament.dart'; +import 'package:clashbot_flutter/pages/home/page/widgets/calendar_widget.dart'; +import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; +import 'package:clashbot_flutter/stores/application_details.store.dart'; +import 'package:clashbot_flutter/stores/discord_details.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; +import 'package:clashbot_flutter/storybook_main.dart'; +import 'package:flutter/widgets.dart'; +import 'package:provider/provider.dart'; +import 'package:storybook_flutter/storybook_flutter.dart'; + +Story StoryCalendarWidgetWTournamentsLoading(BuildContext context) { + DiscordDetailsStore discordDetailsStore = context.read(); + ClashStore clashStoreW5Tournies = new MockClashStore( + context.read().clashBotUser, + [ + ClashTournament('ARAM Clash', '1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('ARAM Clash', '2', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '2', DateTime.now(), + DateTime.now().add(Duration(days: 1))) + ], + [ + ClashTeam( + '1', + 'Mock Team 1', + 'Mock Tournament 1', + '1', + { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }, + '123456789', + DateTime.now(), + ) + ], + ApiCallState.loading, + ApiCallState.loading, + ApiCallState.loading, + new ClashBotServiceImpl( + new UserApi(context.read()), + new TeamApi(context.read()), + new ChampionsApi(context.read()), + new SubscriptionApi(context.read()), + new TentativeApi(context.read()), + new TournamentApi(context.read()), + new ErrorHandlerStore()), + context.read()); + clashStoreW5Tournies.addCallInProgress('getTournaments'); + return Story( + name: "Widgets/Calendar/loading", + description: "ClashBot's main calendar widget loading", + builder: (context) { + return CalendarWidget( + focusedDay: DateTime.now(), + selectedDay: DateTime.now(), + clashStore: clashStoreW5Tournies, + discordDetailsStore: discordDetailsStore); + }, + ); +} + +Story StoryCalendarWidgetWTournaments(BuildContext context) { + DiscordDetailsStore discordDetailsStore = context.read(); + ClashStore clashStoreW5Tournies = new MockClashStore( + context.read().clashBotUser, + [ + ClashTournament('1', 'Mock Tournament 1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('2', 'Mock Tournament 2', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('3', 'Mock Tournament 3', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('4', 'Mock Tournament 4', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('5', 'Mock Tournament 5', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ], + [ + ClashTeam( + '1', + 'Mock Team 1', + 'Mock Tournament 1', + '1', + { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }, + '460520499680641035', + DateTime.now(), + ) + ], + ApiCallState.success, + ApiCallState.success, + ApiCallState.success, + new ClashBotServiceImpl( + new UserApi(context.read()), + new TeamApi(context.read()), + new ChampionsApi(context.read()), + new SubscriptionApi(context.read()), + new TentativeApi(context.read()), + new TournamentApi(context.read()), + new ErrorHandlerStore()), + context.read()); + return Story( + name: "Widgets/Calendar/filled", + description: "ClashBot's main calendar widget filled", + builder: (context) { + return CalendarWidget( + focusedDay: DateTime.now(), + selectedDay: DateTime.now(), + clashStore: clashStoreW5Tournies, + discordDetailsStore: discordDetailsStore); + }, + ); +} + +Story StoryCalendarWidgetFailedToFetchTournaments(BuildContext context) { + DiscordDetailsStore discordDetailsStore = context.read(); + ClashStore clashStoreW5Tournies = new MockClashStore( + context.read().clashBotUser, + [ + ClashTournament('1', 'Mock Tournament 1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('2', 'Mock Tournament 2', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('3', 'Mock Tournament 3', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('4', 'Mock Tournament 4', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('5', 'Mock Tournament 5', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ], + [ + ClashTeam( + '1', + 'Mock Team 1', + 'Mock Tournament 1', + '1', + { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }, + '460520499680641035', + DateTime.now(), + ) + ], + ApiCallState.error, + ApiCallState.success, + ApiCallState.success, + new ClashBotServiceImpl( + new UserApi(context.read()), + new TeamApi(context.read()), + new ChampionsApi(context.read()), + new SubscriptionApi(context.read()), + new TentativeApi(context.read()), + new TournamentApi(context.read()), + new ErrorHandlerStore()), + context.read()); + return Story( + name: "Widgets/Calendar/failedToFetchTournaments", + description: "Failed to fetch tournaments", + builder: (context) { + return CalendarWidget( + focusedDay: DateTime.now(), + selectedDay: DateTime.now(), + clashStore: clashStoreW5Tournies, + discordDetailsStore: discordDetailsStore); + }, + ); +} diff --git a/lib/storybook_main.dart b/lib/storybook_main.dart index 5ee9ca8..3755581 100644 --- a/lib/storybook_main.dart +++ b/lib/storybook_main.dart @@ -1,4 +1,5 @@ import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; import 'package:clashbot_flutter/globals/global_settings.dart'; import 'package:clashbot_flutter/models/clash_team.dart'; import 'package:clashbot_flutter/models/clash_tournament.dart'; @@ -7,6 +8,7 @@ import 'package:clashbot_flutter/models/discord_guild.dart'; import 'package:clashbot_flutter/models/discord_user.dart'; import 'package:clashbot_flutter/pages/errorPages/whoops_page.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/calendar_widget.dart'; +import 'package:clashbot_flutter/pages/home/page/widgets/events_widget.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/team_card.dart'; import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; import 'package:clashbot_flutter/services/discord_service_impl.dart'; @@ -16,7 +18,9 @@ import 'package:clashbot_flutter/stores/discord_details.store.dart'; import 'package:clashbot_flutter/stores/riot_champion.store.dart'; import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; +import 'package:clashbot_flutter/storybook/calendar_widget_storybook.dart'; import 'package:flutter/material.dart'; +import 'package:mobx/mobx.dart'; import 'package:provider/provider.dart'; import 'package:storybook_flutter/storybook_flutter.dart'; @@ -47,12 +51,32 @@ class MockDiscordDetailsStore extends DiscordDetailsStore { } class MockClashStore extends ClashStore { + ApiCallState originalTournamentsApiCallState = ApiCallState.success; MockClashStore( ClashBotUser clashBotUser, List tournaments, List clashTeams, + ApiCallState tournamentsApiCallStateToBeSet, + ApiCallState teamsApiCallState, + ApiCallState userApiCallState, super._clashService, - super._errorhandlerStore); + super._errorhandlerStore) { + this.tournamentsApiCallState = tournamentsApiCallStateToBeSet; + this.originalTournamentsApiCallState = tournamentsApiCallStateToBeSet; + this.teamsApiCallState = teamsApiCallState; + this.userApiCallState = userApiCallState; + this.clashBotUser = clashBotUser; + this.tournaments = ObservableList.of(tournaments); + this.clashTeams = ObservableList.of(clashTeams); + } + + @override + Future refreshClashTournaments(String id) async { + setTournamentsApiCallState(ApiCallState.loading); + await Future.delayed(Duration(seconds: 1), () { + setTournamentsApiCallState(originalTournamentsApiCallState); + }); + } } class MockRiotChampionStore extends RiotChampionStore { @@ -127,6 +151,9 @@ void main() { clashUser, tournaments, clashTeams, + ApiCallState.success, + ApiCallState.success, + ApiCallState.success, ClashBotServiceImpl( UserApi(apiClient), TeamApi(apiClient), @@ -148,172 +175,120 @@ void main() { class ClashBotStorybookApp extends StatelessWidget { @override Widget build(BuildContext context) { - return Storybook(initialStory: "4Filled", stories: [ + return Storybook(initialStory: "EventsListWidget/Events/4Filled", stories: [ StoryCalendarWidgetWTournaments(context), StoryCalendarWidgetWTournamentsLoading(context), + StoryCalendarWidgetFailedToFetchTournaments(context), StoryTeamCard(), - WhoopsPageStory() + WhoopsPageStory(), + EventsListWidgetStory(context), ]); } +} - Story StoryTeamCard() { - return Story( - name: "4Filled", - description: "A card for displaying team information", - builder: (context) { - return TeamCard( - team: ClashTeam( - '1', - 'Mock Team', - 'Tournament 1', - '1', - () { - switch (context.knobs - .text(label: '# of missing roles', initial: '0')) { - case '0': - return { - Role.TOP: PlayerDetails('123456789', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.BOT: PlayerDetails('5', 'Player 4', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }; - case '1': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.BOT: PlayerDetails('5', 'Player 4', []), - Role.SUPP: null, - }; - case '2': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.BOT: null, - Role.SUPP: null, - }; - case '3': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.JG: null, - Role.BOT: null, - Role.SUPP: null, - }; - case '4': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: null, - Role.MID: null, - Role.BOT: null, - Role.SUPP: null, - }; - case '5': - return { - Role.TOP: null, - Role.JG: null, - Role.MID: null, - Role.BOT: null, - Role.SUPP: null, - }; - default: - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }; - } - }(), - '123456789', - DateTime.now(), - )); - }); - } - - Story WhoopsPageStory() { - return Story( - name: "WhoopsPage", - description: "A page for that the app is not usable.", +Story StoryTeamCard() { + return Story( + name: "EventsListWidget/Events/4Filled", + description: "A card for displaying team information", builder: (context) { - return const WhoopsPage(); - }, - ); - } + return TeamCard( + team: ClashTeam( + '1', + 'Mock Team', + 'Tournament 1', + '1', + () { + switch ( + context.knobs.text(label: '# of missing roles', initial: '0')) { + case '0': + return { + Role.TOP: PlayerDetails('123456789', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.BOT: PlayerDetails('5', 'Player 4', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }; + case '1': + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.BOT: PlayerDetails('5', 'Player 4', []), + Role.SUPP: null, + }; + case '2': + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.BOT: null, + Role.SUPP: null, + }; + case '3': + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.JG: null, + Role.BOT: null, + Role.SUPP: null, + }; + case '4': + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: null, + Role.MID: null, + Role.BOT: null, + Role.SUPP: null, + }; + case '5': + return { + Role.TOP: null, + Role.JG: null, + Role.MID: null, + Role.BOT: null, + Role.SUPP: null, + }; + default: + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }; + } + }(), + '123456789', + DateTime.now(), + )); + }); +} - Story StoryCalendarWidgetWTournamentsLoading(BuildContext context) { - DiscordDetailsStore discordDetailsStore = - context.read(); - ClashStore clashStoreW5Tournies = new MockClashStore( - context.read().clashBotUser, - [ - ClashTournament('1', 'Mock Tournament 1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('2', 'Mock Tournament 2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('3', 'Mock Tournament 3', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('4', 'Mock Tournament 4', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('5', 'Mock Tournament 5', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ], - [ - ClashTeam( - '1', - 'Mock Team 1', - 'Mock Tournament 1', - '1', - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '123456789', - DateTime.now(), - ) - ], - new ClashBotServiceImpl( - new UserApi(context.read()), - new TeamApi(context.read()), - new ChampionsApi(context.read()), - new SubscriptionApi(context.read()), - new TentativeApi(context.read()), - new TournamentApi(context.read()), - new ErrorHandlerStore()), - context.read()); - clashStoreW5Tournies.addCallInProgress('getTournaments'); - return Story( - name: "Widgets/Calendar/loading", - description: "ClashBot's main calendar widget loading", - builder: (context) { - return CalendarWidget( - focusedDay: DateTime.now(), - selectedDay: DateTime.now(), - clashStore: clashStoreW5Tournies, - discordDetailsStore: discordDetailsStore); - }, - ); - } +Story WhoopsPageStory() { + return Story( + name: "WhoopsPage", + description: "A page for that the app is not usable.", + builder: (context) { + return const WhoopsPage(); + }, + ); } -Story StoryCalendarWidgetWTournaments(BuildContext context) { +Story EventsListWidgetStory(BuildContext context) { DiscordDetailsStore discordDetailsStore = context.read(); ClashStore clashStoreW5Tournies = new MockClashStore( context.read().clashBotUser, [ - ClashTournament('1', 'Mock Tournament 1', DateTime.now(), + ClashTournament('ARAM Clash', '1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('ARAM Clash', '2', DateTime.now(), DateTime.now().add(Duration(days: 1))), - ClashTournament('2', 'Mock Tournament 2', DateTime.now(), + ClashTournament('Summoner\'s Cup', '1', DateTime.now(), DateTime.now().add(Duration(days: 1))), - ClashTournament('3', 'Mock Tournament 3', DateTime.now(), + ClashTournament('Summoner\'s Cup', '2', DateTime.now(), DateTime.now().add(Duration(days: 1))), - ClashTournament('4', 'Mock Tournament 4', DateTime.now(), + ClashTournament('Summoner\'s Cup', '3', DateTime.now(), DateTime.now().add(Duration(days: 1))), - ClashTournament('5', 'Mock Tournament 5', DateTime.now(), + ClashTournament('Summoner\'s Cup', '4', DateTime.now(), DateTime.now().add(Duration(days: 1))), ], [ @@ -332,6 +307,9 @@ Story StoryCalendarWidgetWTournaments(BuildContext context) { DateTime.now(), ) ], + ApiCallState.error, + ApiCallState.success, + ApiCallState.success, new ClashBotServiceImpl( new UserApi(context.read()), new TeamApi(context.read()), @@ -342,14 +320,11 @@ Story StoryCalendarWidgetWTournaments(BuildContext context) { new ErrorHandlerStore()), context.read()); return Story( - name: "Widgets/Calendar/filled", - description: "ClashBot's main calendar widget filled", + name: "EventsListWidget/Events", builder: (context) { - return CalendarWidget( - focusedDay: DateTime.now(), - selectedDay: DateTime.now(), - clashStore: clashStoreW5Tournies, - discordDetailsStore: discordDetailsStore); + return EventsListWidget( + clashStore: clashStoreW5Tournies, + ); }, ); } From 6179c00fca80fc04b7ed699f675b21b6249bd5a1 Mon Sep 17 00:00:00 2001 From: Daniel Poss Date: Tue, 25 Mar 2025 00:07:42 -0500 Subject: [PATCH 2/4] Add loading and error handling states to EventsListWidget and implement corresponding stories --- .../home/page/widgets/events_widget.dart | 38 ++++++ lib/storybook_main.dart | 114 ++++++++++++++++++ 2 files changed, 152 insertions(+) diff --git a/lib/pages/home/page/widgets/events_widget.dart b/lib/pages/home/page/widgets/events_widget.dart index 9416b52..695549c 100644 --- a/lib/pages/home/page/widgets/events_widget.dart +++ b/lib/pages/home/page/widgets/events_widget.dart @@ -1,3 +1,4 @@ +import 'package:clashbot_flutter/enums/api_call_state.dart'; import 'package:clashbot_flutter/models/clash_team.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/team_card.dart'; import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; @@ -13,6 +14,43 @@ class EventsListWidget extends StatelessWidget { Widget build(BuildContext context) { final DateFormat formatter = DateFormat('yyyy-MM-ddTHH:mm:ssZ'); return Observer(builder: (_) { + if (clashStore.teamsApiCallState == ApiCallState.error) { + return Flex( + direction: Axis.vertical, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Center( + child: IconButton.filled( + onPressed: () { + clashStore.refreshClashTeams( + clashStore.clashBotUser.discordId!, + clashStore.selectedServers); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Retrying to load teams...'), + ), + ); + }, + icon: const Icon(Icons.refresh), + color: Theme.of(context).colorScheme.error, + tooltip: 'Failed to load teams. Click to retry.', + ), + ), + ), + ]); + } else if (clashStore.teamsApiCallState == ApiCallState.loading) { + return const Flex( + direction: Axis.vertical, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Center( + child: CircularProgressIndicator(), + ), + ) + ]); + } var events = clashStore.tournamentsToTeamsFilteredToADayIfActive.entries.toList(); return SingleChildScrollView( diff --git a/lib/storybook_main.dart b/lib/storybook_main.dart index 3755581..08bbad0 100644 --- a/lib/storybook_main.dart +++ b/lib/storybook_main.dart @@ -182,6 +182,8 @@ class ClashBotStorybookApp extends StatelessWidget { StoryTeamCard(), WhoopsPageStory(), EventsListWidgetStory(context), + FailedToLoadEventsListWidgetStory(context), + LoadingEventsListWidgetStory(context), ]); } } @@ -328,3 +330,115 @@ Story EventsListWidgetStory(BuildContext context) { }, ); } + +Story FailedToLoadEventsListWidgetStory(BuildContext context) { + DiscordDetailsStore discordDetailsStore = context.read(); + ClashStore clashStoreW5Tournies = new MockClashStore( + context.read().clashBotUser, + [ + ClashTournament('ARAM Clash', '1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('ARAM Clash', '2', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '2', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '3', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '4', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ], + [ + ClashTeam( + '1', + 'Mock Team 1', + 'Mock Tournament 1', + '1', + { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }, + '460520499680641035', + DateTime.now(), + ) + ], + ApiCallState.success, + ApiCallState.error, + ApiCallState.success, + new ClashBotServiceImpl( + new UserApi(context.read()), + new TeamApi(context.read()), + new ChampionsApi(context.read()), + new SubscriptionApi(context.read()), + new TentativeApi(context.read()), + new TournamentApi(context.read()), + new ErrorHandlerStore()), + context.read()); + return Story( + name: "EventsListWidget/EventsFailedToLoad", + builder: (context) { + return EventsListWidget( + clashStore: clashStoreW5Tournies, + ); + }, + ); +} + +Story LoadingEventsListWidgetStory(BuildContext context) { + DiscordDetailsStore discordDetailsStore = context.read(); + ClashStore clashStoreW5Tournies = new MockClashStore( + context.read().clashBotUser, + [ + ClashTournament('ARAM Clash', '1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('ARAM Clash', '2', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '1', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '2', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '3', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ClashTournament('Summoner\'s Cup', '4', DateTime.now(), + DateTime.now().add(Duration(days: 1))), + ], + [ + ClashTeam( + '1', + 'Mock Team 1', + 'Mock Tournament 1', + '1', + { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }, + '460520499680641035', + DateTime.now(), + ) + ], + ApiCallState.success, + ApiCallState.loading, + ApiCallState.success, + new ClashBotServiceImpl( + new UserApi(context.read()), + new TeamApi(context.read()), + new ChampionsApi(context.read()), + new SubscriptionApi(context.read()), + new TentativeApi(context.read()), + new TournamentApi(context.read()), + new ErrorHandlerStore()), + context.read()); + return Story( + name: "EventsListWidget/EventsLoading", + builder: (context) { + return EventsListWidget( + clashStore: clashStoreW5Tournies, + ); + }, + ); +} From 8f00bda984b4deecd83e25ebeb2b5e1515fedbb6 Mon Sep 17 00:00:00 2001 From: Daniel Poss Date: Tue, 25 Mar 2025 08:42:43 -0500 Subject: [PATCH 3/4] Refactor error handling and remove obsolete state management from stores --- lib/pages/home/page/home_v2.dart | 119 +++++++++--------- .../home/page/widgets/server_chip_list.dart | 16 ++- lib/stores/application_details.store.dart | 14 +-- lib/stores/discord_details.store.dart | 24 ---- lib/stores/v2-stores/clash.store.dart | 13 -- lib/stores/v2-stores/error_handler.store.dart | 13 -- lib/storybook_main.dart | 112 ++++++++++++++--- 7 files changed, 168 insertions(+), 143 deletions(-) diff --git a/lib/pages/home/page/home_v2.dart b/lib/pages/home/page/home_v2.dart index 217d445..60b72d8 100644 --- a/lib/pages/home/page/home_v2.dart +++ b/lib/pages/home/page/home_v2.dart @@ -7,6 +7,7 @@ import 'package:clashbot_flutter/pages/errorPages/whoops_page.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/calendar_widget.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/events_widget.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/server_chip_list.dart'; +import 'package:clashbot_flutter/stores/application_details.store.dart'; import 'package:clashbot_flutter/stores/discord_details.store.dart'; import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; @@ -94,66 +95,68 @@ class _HomeV2State extends State { ClashStore clashStore = context.read(); DiscordDetailsStore discordDetailsStore = context.read(); - ErrorHandlerStore errorHandlerStore = context.read(); + ApplicationDetailsStore applicationDetailsStore = + context.read(); return Scaffold( - body: Observer( - builder: (_) => errorHandlerStore.irreconcilable - ? const WhoopsPage() - : LayoutBuilder( - builder: (context, constraints) { - if (constraints.maxWidth > 500) { - return Row( - children: [ - Flexible( - flex: 1, - child: Flex(direction: Axis.vertical, children: [ - const ServerChipList(), - CalendarWidget( - focusedDay: _focusedDay, - selectedDay: _selectedDay, - clashStore: clashStore, - discordDetailsStore: discordDetailsStore), - Expanded( - child: Card.filled( - color: Theme.of(context).brightness == - Brightness.dark - ? Colors.blueGrey - : Colors.blueAccent, - margin: const EdgeInsets.all(16.0), - child: Padding( - padding: const EdgeInsets.all(16.0), - child: SvgPicture.asset( - 'svgs/ClashBot-HomePage.svg', - semanticsLabel: 'Clash Bot Home Page', - width: 100, - height: 600, - ), - ), - ), - ), - ]), + body: LayoutBuilder( + builder: (context, constraints) { + if (constraints.maxWidth > 500) { + return Row( + children: [ + Flexible( + flex: 1, + child: Flex(direction: Axis.vertical, children: [ + ServerChipList( + appStore: applicationDetailsStore, + discordDetailsStore: discordDetailsStore, + clashStore: clashStore), + CalendarWidget( + focusedDay: _focusedDay, + selectedDay: _selectedDay, + clashStore: clashStore, + discordDetailsStore: discordDetailsStore), + Expanded( + child: Card.filled( + color: Theme.of(context).brightness == Brightness.dark + ? Colors.blueGrey + : Colors.blueAccent, + margin: const EdgeInsets.all(16.0), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: SvgPicture.asset( + 'svgs/ClashBot-HomePage.svg', + semanticsLabel: 'Clash Bot Home Page', + width: 100, + height: 600, + ), ), - Flexible( - flex: 2, - child: EventsListWidget(clashStore: clashStore), - ), - ], - ); - } else { - return Column( - children: [ - ServerChipList(), - CalendarWidget( - focusedDay: _focusedDay, - selectedDay: _selectedDay, - clashStore: clashStore, - discordDetailsStore: discordDetailsStore), - EventsListWidget(clashStore: clashStore), - ], - ); - } - }, - ), + ), + ), + ]), + ), + Flexible( + flex: 2, + child: EventsListWidget(clashStore: clashStore), + ), + ], + ); + } else { + return Column( + children: [ + ServerChipList( + appStore: applicationDetailsStore, + discordDetailsStore: discordDetailsStore, + clashStore: clashStore), + CalendarWidget( + focusedDay: _focusedDay, + selectedDay: _selectedDay, + clashStore: clashStore, + discordDetailsStore: discordDetailsStore), + EventsListWidget(clashStore: clashStore), + ], + ); + } + }, ), floatingActionButton: Observer( builder: (_) => clashStore.canCreateTeam diff --git a/lib/pages/home/page/widgets/server_chip_list.dart b/lib/pages/home/page/widgets/server_chip_list.dart index 8f025df..5fdf856 100644 --- a/lib/pages/home/page/widgets/server_chip_list.dart +++ b/lib/pages/home/page/widgets/server_chip_list.dart @@ -8,21 +8,25 @@ import 'package:provider/provider.dart'; import 'dart:developer' as developer; class ServerChipList extends StatelessWidget { - const ServerChipList({super.key}); + final ApplicationDetailsStore appStore; + final DiscordDetailsStore discordDetailsStore; + final ClashStore clashStore; + + const ServerChipList({ + super.key, + required this.appStore, + required this.discordDetailsStore, + required this.clashStore, + }); @override Widget build(BuildContext context) { - ApplicationDetailsStore appStore = context.read(); - DiscordDetailsStore discordDetailsStore = - context.read(); - ClashStore clashStore = context.read(); return Padding( padding: const EdgeInsets.all(8.0), child: SingleChildScrollView( scrollDirection: Axis.horizontal, child: Observer( builder: (_) { - developer.log("Preferred servers: ${appStore.preferredServers}"); return Row( children: appStore.preferredServers.map((serverId) { bool isSelected = clashStore.selectedServers.contains(serverId); diff --git a/lib/stores/application_details.store.dart b/lib/stores/application_details.store.dart index 39c4aea..653405a 100644 --- a/lib/stores/application_details.store.dart +++ b/lib/stores/application_details.store.dart @@ -40,18 +40,6 @@ abstract class _ApplicationDetailsStore with Store { _clashStore.clashBotUser.selectedServers); } }); - - reaction( - (_) => (_discordDetailsStore.failedToLoad, _clashStore.failedToLoad), - (failedToLoad) { - if (failedToLoad.$1 && failedToLoad.$2) { - _errorHandlerStore.setIrreconcilable(); - } else if (failedToLoad.$2) { - _errorHandlerStore.setIrreconcilable(); - } else { - _errorHandlerStore.clearIrreconcilable(); - } - }); } @observable @@ -79,7 +67,7 @@ abstract class _ApplicationDetailsStore with Store { @computed ObservableList get preferredServers => - ObservableList.of(_clashStore.selectedServers); + ObservableList.of(clashBotUser.preferredServers.sorted()); @computed List get sortedNotifications => diff --git a/lib/stores/discord_details.store.dart b/lib/stores/discord_details.store.dart index 5a5d7da..cbcf4b9 100644 --- a/lib/stores/discord_details.store.dart +++ b/lib/stores/discord_details.store.dart @@ -28,9 +28,6 @@ abstract class _DiscordDetailsStore with Store { @observable ObservableList callsInProgress = ObservableList(); - @observable - bool failedToLoad = false; - @computed bool get loadingData => callsInProgress.isNotEmpty; @@ -44,22 +41,6 @@ abstract class _DiscordDetailsStore with Store { Map get discordGuildMap => {for (var guild in discordGuilds) guild.id: guild}; - @computed - bool get irreconcilableError => failedToLoad && discordUser.id == '0'; - - @action - void loadingUserDetailsFailed() { - developer.log("loadingUserDetailsFailed"); - developer.log("failedToLoad: ${failedToLoad}"); - failedToLoad = true; - developer.log("failedToLoad: ${failedToLoad}"); - } - - @action - void userDetailsSuccessfullyLoaded() { - failedToLoad = false; - } - @action void addCallInProgress(String call) { callsInProgress.add(call); @@ -80,7 +61,6 @@ abstract class _DiscordDetailsStore with Store { addCallInProgress('fetchUserDetails'); var foundUser; try { - userDetailsSuccessfullyLoaded(); foundUser = await _discordService.fetchUserDetails(discordId); discordIdToName.putIfAbsent(discordId, () => foundUser.username); } on Exception catch (error) { @@ -95,14 +75,12 @@ abstract class _DiscordDetailsStore with Store { addCallInProgress('fetchCurrentUserDetails'); final future = _discordService.fetchCurrentUserDetails(); try { - userDetailsSuccessfullyLoaded(); DiscordUser updatedUser = await future; discordUser = updatedUser.copy(); discordIdToName.putIfAbsent(updatedUser.id, () => updatedUser.username); } on Exception catch (error) { _errorHandlerStore.errorMessage = 'Failed to fetch Discord User details due to ${error.toString()}'; - loadingUserDetailsFailed(); } removeCallInProgress('fetchCurrentUserDetails'); } @@ -112,13 +90,11 @@ abstract class _DiscordDetailsStore with Store { addCallInProgress('fetchUserGuilds'); final future = _discordService.fetchUserGuilds(); try { - userDetailsSuccessfullyLoaded(); List guilds = await future; discordGuilds.clear(); discordGuilds.addAll(guilds); } on Exception catch (error) { _errorHandlerStore.errorMessage = error.toString(); - loadingUserDetailsFailed(); } removeCallInProgress('fetchUserGuilds'); } diff --git a/lib/stores/v2-stores/clash.store.dart b/lib/stores/v2-stores/clash.store.dart index ca0c2e0..696b561 100644 --- a/lib/stores/v2-stores/clash.store.dart +++ b/lib/stores/v2-stores/clash.store.dart @@ -57,9 +57,6 @@ abstract class _ClashStore with Store { callsInProgress.contains(_ClashStore.refreshClashTournamentsCall) || callsInProgress.contains(_ClashStore.refreshClashTeamsCall); - @observable - bool failedToLoad = false; - @observable ApiCallState tournamentsApiCallState = ApiCallState.idle; @@ -84,16 +81,6 @@ abstract class _ClashStore with Store { userApiCallState = state; } - @action - void loadingUserDetailsFailed() { - failedToLoad = true; - } - - @action - void userDetailsSuccessfullyLoaded() { - failedToLoad = false; - } - @action void addCallInProgress(String call) { callsInProgress.add(call); diff --git a/lib/stores/v2-stores/error_handler.store.dart b/lib/stores/v2-stores/error_handler.store.dart index c800414..9d5caaa 100644 --- a/lib/stores/v2-stores/error_handler.store.dart +++ b/lib/stores/v2-stores/error_handler.store.dart @@ -8,19 +8,6 @@ abstract class _ErrorHandlerStore with Store { @observable String errorMessage = ''; - @observable - bool irreconcilable = false; - - @action - void setIrreconcilable() { - irreconcilable = true; - } - - @action - void clearIrreconcilable() { - irreconcilable = false; - } - @action void setErrorMessage(String message) { errorMessage = message; diff --git a/lib/storybook_main.dart b/lib/storybook_main.dart index 08bbad0..c23ec61 100644 --- a/lib/storybook_main.dart +++ b/lib/storybook_main.dart @@ -9,6 +9,7 @@ import 'package:clashbot_flutter/models/discord_user.dart'; import 'package:clashbot_flutter/pages/errorPages/whoops_page.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/calendar_widget.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/events_widget.dart'; +import 'package:clashbot_flutter/pages/home/page/widgets/server_chip_list.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/team_card.dart'; import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; import 'package:clashbot_flutter/services/discord_service_impl.dart'; @@ -27,27 +28,22 @@ import 'package:storybook_flutter/storybook_flutter.dart'; class MockApplicationDetailsStore extends ApplicationDetailsStore { MockApplicationDetailsStore( ClashBotUser mockClashBotUser, + List mockPreferredServers, super._clashStore, super._discordDetailsStore, super._riotChampionStore, - super._errorHandlerStore); - - @override - ClashBotUser get clashBotUser => ClashBotUser( - discordId: '123456789', - champions: [], - role: Role.TOP, - serverId: 'server1', - selectedServers: [ - 'server1', - ], - preferredServers: ['server1', 'server2'], - ); + super._errorHandlerStore) { + clashBotUser = mockClashBotUser; + clashBotUser.preferredServers = ObservableList.of(mockPreferredServers); + } } class MockDiscordDetailsStore extends DiscordDetailsStore { - MockDiscordDetailsStore(List guilds, DiscordUser user, - super.discordService, super._errorHandlerStore); + MockDiscordDetailsStore(List guilds, DiscordUser discordUser, + super.discordService, super._errorHandlerStore) { + discordGuilds = ObservableList.of(guilds); + this.discordUser = discordUser; + } } class MockClashStore extends ClashStore { @@ -167,7 +163,7 @@ void main() { RiotChampionStore, ApplicationDetailsStore>( update: (_, clashStore, errorHandlerStore, discordDetailsStore, riotChampionStore, __) => - MockApplicationDetailsStore(clashUser, clashStore, + MockApplicationDetailsStore(clashUser, [], clashStore, discordDetailsStore, riotChampionStore, errorHandlerStore)), ], child: ClashBotStorybookApp())); } @@ -176,14 +172,24 @@ class ClashBotStorybookApp extends StatelessWidget { @override Widget build(BuildContext context) { return Storybook(initialStory: "EventsListWidget/Events/4Filled", stories: [ + // Calendar Widget Stories StoryCalendarWidgetWTournaments(context), StoryCalendarWidgetWTournamentsLoading(context), StoryCalendarWidgetFailedToFetchTournaments(context), + + // Team Card Stories StoryTeamCard(), + + // Whoops Page Story WhoopsPageStory(), + + // Events List Widget Stories EventsListWidgetStory(context), FailedToLoadEventsListWidgetStory(context), LoadingEventsListWidgetStory(context), + + // Server Chips List + StoryServerChipsList(context), ]); } } @@ -442,3 +448,77 @@ Story LoadingEventsListWidgetStory(BuildContext context) { }, ); } + +Story StoryServerChipsList(BuildContext context) { + ApplicationDetailsStore applicationDetailsStore = MockApplicationDetailsStore( + ClashBotUser( + discordId: '123456789', + champions: [], + role: Role.TOP, + serverId: '123456789', + selectedServers: [ + '123456789', + ], + preferredServers: ['123456789', '123456788'], + ), + ['123456789', '123456788'], + context.read(), + context.read(), + context.read(), + context.read()); + + ClashStore clashStore = context.read(); + + return Story( + name: "Widgets/ServerChipsList/filled", + description: "A list of server chips", + builder: (context) { + int numberOfServers = context.knobs + .sliderInt(label: "numberOfServers", initial: 2, max: 5, min: 1); + List servers = buildMockServers(numberOfServers); + return ServerChipList( + appStore: buildApplicationStoreWServers(servers, context), + discordDetailsStore: MockDiscordDetailsStore( + buildMockDiscordGuilds(servers), + DiscordUser('123456789', 'mock_username', '123456789', + "mock_discriminator"), + new DiscordServiceImpl(setupOauth2Helper()), + new ErrorHandlerStore()), + clashStore: clashStore, + ); + }, + ); +} + +buildApplicationStoreWServers(List servers, BuildContext context) { + return MockApplicationDetailsStore( + ClashBotUser( + discordId: '123456789', + champions: [], + role: Role.TOP, + serverId: servers[0], + selectedServers: servers, + preferredServers: servers, + ), + servers, + context.read(), + context.read(), + context.read(), + context.read()); +} + +List buildMockServers(int numberOfServers) { + List servers = []; + for (var i = 0; i < numberOfServers; i++) { + servers.add('server$i'); + } + return servers; +} + +List buildMockDiscordGuilds(List servers) { + List guilds = []; + for (var i = 0; i < servers.length; i++) { + guilds.add(DiscordGuild(servers[i], 'Mock Guild $i', '123456789', false)); + } + return guilds; +} From dd7a57315e88ab72189b0e2c4b2562f01e12af95 Mon Sep 17 00:00:00 2001 From: Daniel Poss Date: Tue, 25 Mar 2025 20:50:14 -0500 Subject: [PATCH 4/4] Add initial project files, including web assets, README, and configuration --- lib/pages/home/page/home_v2.dart | 10 +- .../home/page/widgets/calendar_widget.dart | 7 +- .../home/page/widgets/events_widget.dart | 85 +- .../home/page/widgets/server_chip_list.dart | 2 +- lib/pages/home/page/widgets/team_card.dart | 42 +- lib/stores/application_details.store.dart | 15 +- lib/stores/v2-stores/clash.store.dart | 10 +- lib/storybook/calendar_widget_storybook.dart | 184 --- lib/storybook_main.dart | 524 ------- widgetbook/.gitignore | 45 + widgetbook/.metadata | 30 + widgetbook/README.md | 3 + widgetbook/analysis_options.yaml | 1 + widgetbook/devtools_options.yaml | 3 + widgetbook/lib/calendar_widget.dart | 166 +++ widgetbook/lib/event_list_widget.dart | 121 ++ widgetbook/lib/main.dart | 31 + widgetbook/lib/server_list_widget.dart | 125 ++ widgetbook/lib/team_card_widget.dart | 139 ++ widgetbook/lib/utils/mock_utils.dart | 140 ++ widgetbook/pubspec.lock | 1277 +++++++++++++++++ widgetbook/pubspec.yaml | 65 + widgetbook/web/favicon.png | Bin 0 -> 917 bytes widgetbook/web/icons/Icon-192.png | Bin 0 -> 5292 bytes widgetbook/web/icons/Icon-512.png | Bin 0 -> 8252 bytes widgetbook/web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes widgetbook/web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes widgetbook/web/index.html | 38 + widgetbook/web/manifest.json | 35 + 29 files changed, 2335 insertions(+), 763 deletions(-) delete mode 100644 lib/storybook/calendar_widget_storybook.dart delete mode 100644 lib/storybook_main.dart create mode 100644 widgetbook/.gitignore create mode 100644 widgetbook/.metadata create mode 100644 widgetbook/README.md create mode 100644 widgetbook/analysis_options.yaml create mode 100644 widgetbook/devtools_options.yaml create mode 100644 widgetbook/lib/calendar_widget.dart create mode 100644 widgetbook/lib/event_list_widget.dart create mode 100644 widgetbook/lib/main.dart create mode 100644 widgetbook/lib/server_list_widget.dart create mode 100644 widgetbook/lib/team_card_widget.dart create mode 100644 widgetbook/lib/utils/mock_utils.dart create mode 100644 widgetbook/pubspec.lock create mode 100644 widgetbook/pubspec.yaml create mode 100644 widgetbook/web/favicon.png create mode 100644 widgetbook/web/icons/Icon-192.png create mode 100644 widgetbook/web/icons/Icon-512.png create mode 100644 widgetbook/web/icons/Icon-maskable-192.png create mode 100644 widgetbook/web/icons/Icon-maskable-512.png create mode 100644 widgetbook/web/index.html create mode 100644 widgetbook/web/manifest.json diff --git a/lib/pages/home/page/home_v2.dart b/lib/pages/home/page/home_v2.dart index 60b72d8..d53707d 100644 --- a/lib/pages/home/page/home_v2.dart +++ b/lib/pages/home/page/home_v2.dart @@ -136,7 +136,10 @@ class _HomeV2State extends State { ), Flexible( flex: 2, - child: EventsListWidget(clashStore: clashStore), + child: EventsListWidget( + clashStore: clashStore, + applicationDetailsStore: applicationDetailsStore, + discordDetailStore: discordDetailsStore), ), ], ); @@ -152,7 +155,10 @@ class _HomeV2State extends State { selectedDay: _selectedDay, clashStore: clashStore, discordDetailsStore: discordDetailsStore), - EventsListWidget(clashStore: clashStore), + EventsListWidget( + clashStore: clashStore, + applicationDetailsStore: applicationDetailsStore, + discordDetailStore: discordDetailsStore), ], ); } diff --git a/lib/pages/home/page/widgets/calendar_widget.dart b/lib/pages/home/page/widgets/calendar_widget.dart index 13488b7..29cb5e6 100644 --- a/lib/pages/home/page/widgets/calendar_widget.dart +++ b/lib/pages/home/page/widgets/calendar_widget.dart @@ -9,6 +9,7 @@ import 'package:intl/intl.dart'; import 'package:mobx/mobx.dart'; import 'package:provider/provider.dart'; import 'package:table_calendar/table_calendar.dart'; +import 'dart:developer' as developer; /// This widget requires the following providers: /// @@ -160,6 +161,8 @@ class CalendarHeader extends StatelessWidget { @override Widget build(BuildContext context) { return Observer(builder: (_) { + developer.log( + "CalendarHeader: Api Status${clashStore.tournamentsApiCallState}"); InputChip chip; switch (clashStore.tournamentsApiCallState) { case ApiCallState.loading: @@ -204,9 +207,7 @@ class CalendarHeader extends StatelessWidget { onMonthChanged(DateTime(focusedDay.year, focusedDay.month - 1)); }, ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, + Wrap( spacing: 10, children: [ Text( diff --git a/lib/pages/home/page/widgets/events_widget.dart b/lib/pages/home/page/widgets/events_widget.dart index 695549c..a49ab44 100644 --- a/lib/pages/home/page/widgets/events_widget.dart +++ b/lib/pages/home/page/widgets/events_widget.dart @@ -1,14 +1,22 @@ import 'package:clashbot_flutter/enums/api_call_state.dart'; import 'package:clashbot_flutter/models/clash_team.dart'; import 'package:clashbot_flutter/pages/home/page/widgets/team_card.dart'; +import 'package:clashbot_flutter/stores/application_details.store.dart'; +import 'package:clashbot_flutter/stores/discord_details.store.dart'; import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:intl/intl.dart'; class EventsListWidget extends StatelessWidget { + const EventsListWidget( + {super.key, + required this.clashStore, + required this.applicationDetailsStore, + required this.discordDetailStore}); final ClashStore clashStore; - const EventsListWidget({super.key, required this.clashStore}); + final ApplicationDetailsStore applicationDetailsStore; + final DiscordDetailsStore discordDetailStore; @override Widget build(BuildContext context) { @@ -53,31 +61,36 @@ class EventsListWidget extends StatelessWidget { } var events = clashStore.tournamentsToTeamsFilteredToADayIfActive.entries.toList(); - return SingleChildScrollView( - child: ListView.builder( - shrinkWrap: true, - physics: const BouncingScrollPhysics(), - itemCount: clashStore.tournamentsToTeams.entries.length, - itemBuilder: (context, index) { - if (clashStore.filterByDay && events[index].value.isEmpty) { - return const SizedBox.shrink(); - } - return EventTile( - event: { - 'title': events[index].key.tournamentName, - 'day': events[index].key.tournamentDay, - 'date': formatter.format(events[index].key.startTime.toLocal()), - 'startTime': - formatter.format(events[index].key.startTime.toLocal()), - 'endTime': - formatter.format(events[index].key.startTime.toLocal()), - 'description': "Some description.", - 'registrationOpenDateTime': - formatter.format(events[index].key.startTime.toLocal()) - }, - eventTeams: events[index].value, - ); - }, + return Flexible( + child: SingleChildScrollView( + child: ListView.builder( + shrinkWrap: true, + physics: const BouncingScrollPhysics(), + itemCount: clashStore.tournamentsToTeams.entries.length, + itemBuilder: (context, index) { + if (clashStore.filterByDay && events[index].value.isEmpty) { + return const SizedBox.shrink(); + } + return EventTile( + event: { + 'title': events[index].key.tournamentName, + 'day': events[index].key.tournamentDay, + 'date': + formatter.format(events[index].key.startTime.toLocal()), + 'startTime': + formatter.format(events[index].key.startTime.toLocal()), + 'endTime': + formatter.format(events[index].key.startTime.toLocal()), + 'description': "Some description.", + 'registrationOpenDateTime': + formatter.format(events[index].key.startTime.toLocal()) + }, + eventTeams: events[index].value, + applicationDetailsStore: applicationDetailsStore, + discordDetailStore: discordDetailStore, + ); + }, + ), ), ); }); @@ -85,14 +98,17 @@ class EventsListWidget extends StatelessWidget { } class EventTile extends StatelessWidget { - const EventTile({ - super.key, - required this.event, - required this.eventTeams, - }); + const EventTile( + {super.key, + required this.event, + required this.eventTeams, + required this.applicationDetailsStore, + required this.discordDetailStore}); final Map event; final List eventTeams; + final ApplicationDetailsStore applicationDetailsStore; + final DiscordDetailsStore discordDetailStore; @override Widget build(BuildContext context) { @@ -142,7 +158,7 @@ class EventTile extends StatelessWidget { ), Row( children: [ - const Icon(Icons.app_registration), + const Icon(Icons.how_to_reg), Padding( padding: const EdgeInsets.only(left: 8.0), child: Text(DateFormat('h:mm a Z').format( @@ -159,7 +175,10 @@ class EventTile extends StatelessWidget { direction: Axis.horizontal, alignment: WrapAlignment.center, children: eventTeams.map((team) { - return TeamCard(team: team); + return TeamCard( + team: team, + applicationDetailsStore: applicationDetailsStore, + discordDetailsStore: discordDetailStore); }).toList(), ), ) diff --git a/lib/pages/home/page/widgets/server_chip_list.dart b/lib/pages/home/page/widgets/server_chip_list.dart index 5fdf856..78c9881 100644 --- a/lib/pages/home/page/widgets/server_chip_list.dart +++ b/lib/pages/home/page/widgets/server_chip_list.dart @@ -32,7 +32,7 @@ class ServerChipList extends StatelessWidget { bool isSelected = clashStore.selectedServers.contains(serverId); return Padding( padding: const EdgeInsets.symmetric(horizontal: 4.0), - child: FilterChip( + child: FilterChip.elevated( avatar: CircleAvatar( backgroundImage: discordDetailsStore .discordGuildMap[serverId]?.iconURL != diff --git a/lib/pages/home/page/widgets/team_card.dart b/lib/pages/home/page/widgets/team_card.dart index c457cd6..2671ff5 100644 --- a/lib/pages/home/page/widgets/team_card.dart +++ b/lib/pages/home/page/widgets/team_card.dart @@ -6,6 +6,7 @@ import 'package:clashbot_flutter/stores/application_details.store.dart'; import 'package:clashbot_flutter/stores/discord_details.store.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; +import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'dart:developer' as developer; @@ -14,8 +15,13 @@ class TeamCard extends StatelessWidget { TeamCard({ super.key, required this.team, + required this.applicationDetailsStore, + required this.discordDetailsStore, }); + final ApplicationDetailsStore applicationDetailsStore; + final DiscordDetailsStore discordDetailsStore; + final ClashTeam team; final Map roleToImage = { Role.TOP: 'images/TopIcon.webp', @@ -27,10 +33,7 @@ class TeamCard extends StatelessWidget { @override Widget build(BuildContext context) { - ApplicationDetailsStore applicationDetailsStore = - context.read(); - DiscordDetailsStore discordDetailsStore = - context.read(); + final DateFormat formatter = DateFormat('yyyy-MM-ddTHH:mm:ssZ'); return Card( surfaceTintColor: Theme.of(context).brightness == Brightness.dark ? const Color.fromARGB( @@ -59,12 +62,31 @@ class TeamCard extends StatelessWidget { : null, ); }), - Text( - team.name.length > 20 - ? '${team.name.substring(0, 20)}...' - : team.name, - style: Theme.of(context).textTheme.titleLarge, - ), + Observer(builder: (_) { + var formattedDate = DateFormat.yMd().add_jm().format( + DateTime.parse( + formatter.format(team.lastUpdatedAt.toLocal()))); + return Column( + children: [ + Text( + team.name.length > 20 + ? '${team.name.substring(0, 20)}...' + : team.name, + style: Theme.of(context).textTheme.titleLarge, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 5, + children: [ + Icon(Icons.update), + Text(formattedDate, + style: Theme.of(context).textTheme.bodySmall), + ], + ), + ], + ); + }), const IconButton.filledTonal( tooltip: 'Coming soon...', icon: Icon(Icons.fullscreen), diff --git a/lib/stores/application_details.store.dart b/lib/stores/application_details.store.dart index 653405a..483d5ad 100644 --- a/lib/stores/application_details.store.dart +++ b/lib/stores/application_details.store.dart @@ -38,6 +38,7 @@ abstract class _ApplicationDetailsStore with Store { .refreshClashTournaments(_clashStore.clashBotUser.discordId!); _clashStore.refreshClashTeams(_clashStore.clashBotUser.discordId!, _clashStore.clashBotUser.selectedServers); + setPreferredServers(_clashStore.clashBotUser.selectedServers); } }); } @@ -48,6 +49,9 @@ abstract class _ApplicationDetailsStore with Store { @observable ObservableList notifications = ObservableList(); + @observable + ObservableList preferredServers = ObservableList(); + @computed bool get isLoggedIn => _discordDetailsStore.userHasLoggedIn && clashBotUser.discordId != '0'; @@ -65,10 +69,6 @@ abstract class _ApplicationDetailsStore with Store { ObservableList get sortedSelectedServers => ObservableList.of(clashBotUser.selectedServers.sorted()); - @computed - ObservableList get preferredServers => - ObservableList.of(clashBotUser.preferredServers.sorted()); - @computed List get sortedNotifications => notifications.sortedBy((element) => element.timestamp); @@ -77,6 +77,13 @@ abstract class _ApplicationDetailsStore with Store { List get unreadNotifications => notifications.where((notification) => !notification.read).toList(); + @action + void setPreferredServers(List servers) { + developer.log( + "ApplicationDetailsStore: setPreferredServers $servers"); + preferredServers = ObservableList.of(servers); + } + @action void refreshDiscordUser() { _discordDetailsStore.fetchCurrentUserDetails(); diff --git a/lib/stores/v2-stores/clash.store.dart b/lib/stores/v2-stores/clash.store.dart index 696b561..6e756ae 100644 --- a/lib/stores/v2-stores/clash.store.dart +++ b/lib/stores/v2-stores/clash.store.dart @@ -218,8 +218,14 @@ abstract class _ClashStore with Store { @action Future refreshClashTournaments(String id) async { addCallInProgress(_ClashStore.refreshClashTournamentsCall); - tournaments = - ObservableList.of(await _clashService.retrieveTournaments(id)); + setTournamentsApiCallState(ApiCallState.loading); + try { + tournaments = + ObservableList.of(await _clashService.retrieveTournaments(id)); + } catch (e) { + setTournamentsApiCallState(ApiCallState.error); + } + setTournamentsApiCallState(ApiCallState.success); removeCallInProgress(_ClashStore.refreshClashTournamentsCall); } diff --git a/lib/storybook/calendar_widget_storybook.dart b/lib/storybook/calendar_widget_storybook.dart deleted file mode 100644 index a51bd56..0000000 --- a/lib/storybook/calendar_widget_storybook.dart +++ /dev/null @@ -1,184 +0,0 @@ -import 'package:clash_bot_api/api.dart'; -import 'package:clashbot_flutter/enums/api_call_state.dart'; -import 'package:clashbot_flutter/models/clash_team.dart'; -import 'package:clashbot_flutter/models/clash_tournament.dart'; -import 'package:clashbot_flutter/pages/home/page/widgets/calendar_widget.dart'; -import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; -import 'package:clashbot_flutter/stores/application_details.store.dart'; -import 'package:clashbot_flutter/stores/discord_details.store.dart'; -import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; -import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; -import 'package:clashbot_flutter/storybook_main.dart'; -import 'package:flutter/widgets.dart'; -import 'package:provider/provider.dart'; -import 'package:storybook_flutter/storybook_flutter.dart'; - -Story StoryCalendarWidgetWTournamentsLoading(BuildContext context) { - DiscordDetailsStore discordDetailsStore = context.read(); - ClashStore clashStoreW5Tournies = new MockClashStore( - context.read().clashBotUser, - [ - ClashTournament('ARAM Clash', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('ARAM Clash', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))) - ], - [ - ClashTeam( - '1', - 'Mock Team 1', - 'Mock Tournament 1', - '1', - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '123456789', - DateTime.now(), - ) - ], - ApiCallState.loading, - ApiCallState.loading, - ApiCallState.loading, - new ClashBotServiceImpl( - new UserApi(context.read()), - new TeamApi(context.read()), - new ChampionsApi(context.read()), - new SubscriptionApi(context.read()), - new TentativeApi(context.read()), - new TournamentApi(context.read()), - new ErrorHandlerStore()), - context.read()); - clashStoreW5Tournies.addCallInProgress('getTournaments'); - return Story( - name: "Widgets/Calendar/loading", - description: "ClashBot's main calendar widget loading", - builder: (context) { - return CalendarWidget( - focusedDay: DateTime.now(), - selectedDay: DateTime.now(), - clashStore: clashStoreW5Tournies, - discordDetailsStore: discordDetailsStore); - }, - ); -} - -Story StoryCalendarWidgetWTournaments(BuildContext context) { - DiscordDetailsStore discordDetailsStore = context.read(); - ClashStore clashStoreW5Tournies = new MockClashStore( - context.read().clashBotUser, - [ - ClashTournament('1', 'Mock Tournament 1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('2', 'Mock Tournament 2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('3', 'Mock Tournament 3', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('4', 'Mock Tournament 4', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('5', 'Mock Tournament 5', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ], - [ - ClashTeam( - '1', - 'Mock Team 1', - 'Mock Tournament 1', - '1', - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '460520499680641035', - DateTime.now(), - ) - ], - ApiCallState.success, - ApiCallState.success, - ApiCallState.success, - new ClashBotServiceImpl( - new UserApi(context.read()), - new TeamApi(context.read()), - new ChampionsApi(context.read()), - new SubscriptionApi(context.read()), - new TentativeApi(context.read()), - new TournamentApi(context.read()), - new ErrorHandlerStore()), - context.read()); - return Story( - name: "Widgets/Calendar/filled", - description: "ClashBot's main calendar widget filled", - builder: (context) { - return CalendarWidget( - focusedDay: DateTime.now(), - selectedDay: DateTime.now(), - clashStore: clashStoreW5Tournies, - discordDetailsStore: discordDetailsStore); - }, - ); -} - -Story StoryCalendarWidgetFailedToFetchTournaments(BuildContext context) { - DiscordDetailsStore discordDetailsStore = context.read(); - ClashStore clashStoreW5Tournies = new MockClashStore( - context.read().clashBotUser, - [ - ClashTournament('1', 'Mock Tournament 1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('2', 'Mock Tournament 2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('3', 'Mock Tournament 3', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('4', 'Mock Tournament 4', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('5', 'Mock Tournament 5', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ], - [ - ClashTeam( - '1', - 'Mock Team 1', - 'Mock Tournament 1', - '1', - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '460520499680641035', - DateTime.now(), - ) - ], - ApiCallState.error, - ApiCallState.success, - ApiCallState.success, - new ClashBotServiceImpl( - new UserApi(context.read()), - new TeamApi(context.read()), - new ChampionsApi(context.read()), - new SubscriptionApi(context.read()), - new TentativeApi(context.read()), - new TournamentApi(context.read()), - new ErrorHandlerStore()), - context.read()); - return Story( - name: "Widgets/Calendar/failedToFetchTournaments", - description: "Failed to fetch tournaments", - builder: (context) { - return CalendarWidget( - focusedDay: DateTime.now(), - selectedDay: DateTime.now(), - clashStore: clashStoreW5Tournies, - discordDetailsStore: discordDetailsStore); - }, - ); -} diff --git a/lib/storybook_main.dart b/lib/storybook_main.dart deleted file mode 100644 index c23ec61..0000000 --- a/lib/storybook_main.dart +++ /dev/null @@ -1,524 +0,0 @@ -import 'package:clash_bot_api/api.dart'; -import 'package:clashbot_flutter/enums/api_call_state.dart'; -import 'package:clashbot_flutter/globals/global_settings.dart'; -import 'package:clashbot_flutter/models/clash_team.dart'; -import 'package:clashbot_flutter/models/clash_tournament.dart'; -import 'package:clashbot_flutter/models/clashbot_user.dart'; -import 'package:clashbot_flutter/models/discord_guild.dart'; -import 'package:clashbot_flutter/models/discord_user.dart'; -import 'package:clashbot_flutter/pages/errorPages/whoops_page.dart'; -import 'package:clashbot_flutter/pages/home/page/widgets/calendar_widget.dart'; -import 'package:clashbot_flutter/pages/home/page/widgets/events_widget.dart'; -import 'package:clashbot_flutter/pages/home/page/widgets/server_chip_list.dart'; -import 'package:clashbot_flutter/pages/home/page/widgets/team_card.dart'; -import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; -import 'package:clashbot_flutter/services/discord_service_impl.dart'; -import 'package:clashbot_flutter/services/riot_resources_service_impl.dart'; -import 'package:clashbot_flutter/stores/application_details.store.dart'; -import 'package:clashbot_flutter/stores/discord_details.store.dart'; -import 'package:clashbot_flutter/stores/riot_champion.store.dart'; -import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; -import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; -import 'package:clashbot_flutter/storybook/calendar_widget_storybook.dart'; -import 'package:flutter/material.dart'; -import 'package:mobx/mobx.dart'; -import 'package:provider/provider.dart'; -import 'package:storybook_flutter/storybook_flutter.dart'; - -class MockApplicationDetailsStore extends ApplicationDetailsStore { - MockApplicationDetailsStore( - ClashBotUser mockClashBotUser, - List mockPreferredServers, - super._clashStore, - super._discordDetailsStore, - super._riotChampionStore, - super._errorHandlerStore) { - clashBotUser = mockClashBotUser; - clashBotUser.preferredServers = ObservableList.of(mockPreferredServers); - } -} - -class MockDiscordDetailsStore extends DiscordDetailsStore { - MockDiscordDetailsStore(List guilds, DiscordUser discordUser, - super.discordService, super._errorHandlerStore) { - discordGuilds = ObservableList.of(guilds); - this.discordUser = discordUser; - } -} - -class MockClashStore extends ClashStore { - ApiCallState originalTournamentsApiCallState = ApiCallState.success; - MockClashStore( - ClashBotUser clashBotUser, - List tournaments, - List clashTeams, - ApiCallState tournamentsApiCallStateToBeSet, - ApiCallState teamsApiCallState, - ApiCallState userApiCallState, - super._clashService, - super._errorhandlerStore) { - this.tournamentsApiCallState = tournamentsApiCallStateToBeSet; - this.originalTournamentsApiCallState = tournamentsApiCallStateToBeSet; - this.teamsApiCallState = teamsApiCallState; - this.userApiCallState = userApiCallState; - this.clashBotUser = clashBotUser; - this.tournaments = ObservableList.of(tournaments); - this.clashTeams = ObservableList.of(clashTeams); - } - - @override - Future refreshClashTournaments(String id) async { - setTournamentsApiCallState(ApiCallState.loading); - await Future.delayed(Duration(seconds: 1), () { - setTournamentsApiCallState(originalTournamentsApiCallState); - }); - } -} - -class MockRiotChampionStore extends RiotChampionStore { - MockRiotChampionStore(super._riotResourcesService, super._errorHandlerStore); -} - -void main() { - var loggedInUserId = '123456789'; - var clashUser = ClashBotUser( - discordId: loggedInUserId, - champions: [], - role: Role.TOP, - serverId: 'server1', - selectedServers: [ - 'server1', - ], - preferredServers: ['server1', 'server2'], - ); - var guilds = [ - DiscordGuild('1', 'Mock Guild 1', '123456789', false), - DiscordGuild('2', 'Mock Guild 2', '123456789', false), - ]; - var tournaments = [ - ClashTournament('1', 'Mock Tournament 1', DateTime.now(), DateTime.now()), - ClashTournament('2', 'Mock Tournament 2', DateTime.now(), DateTime.now()), - ]; - var clashTeams = [ - ClashTeam( - '1', - 'Mock Team 1', - tournaments[0].tournamentName, - tournaments[0].tournamentDay, - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '123456789', - DateTime.now(), - ), - ClashTeam( - '2', - 'Mock Team 2', - tournaments[0].tournamentName, - tournaments[0].tournamentDay, - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '123456789', - DateTime.now(), - ), - ]; - var discordUser = DiscordUser( - loggedInUserId, 'mock_username', '123456789', "mock_discriminator"); - runApp(MultiProvider(providers: [ - Provider(create: (_) => ApiClient(basePath: "http://localhost")), - Provider(create: (_) => ErrorHandlerStore()), - ProxyProvider( - update: (_, errorHandlerStore, __) { - return MockDiscordDetailsStore(guilds, discordUser, - DiscordServiceImpl(setupOauth2Helper()), errorHandlerStore); - }), - ProxyProvider( - update: (_, errorHandlerStore, __) => MockRiotChampionStore( - RiotResourceServiceImpl(), errorHandlerStore)), - ProxyProvider2( - update: (_, errorHandlerStore, apiClient, __) => MockClashStore( - clashUser, - tournaments, - clashTeams, - ApiCallState.success, - ApiCallState.success, - ApiCallState.success, - ClashBotServiceImpl( - UserApi(apiClient), - TeamApi(apiClient), - ChampionsApi(apiClient), - SubscriptionApi(apiClient), - TentativeApi(apiClient), - TournamentApi(apiClient), - errorHandlerStore), - errorHandlerStore)), - ProxyProvider4( - update: (_, clashStore, errorHandlerStore, discordDetailsStore, - riotChampionStore, __) => - MockApplicationDetailsStore(clashUser, [], clashStore, - discordDetailsStore, riotChampionStore, errorHandlerStore)), - ], child: ClashBotStorybookApp())); -} - -class ClashBotStorybookApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Storybook(initialStory: "EventsListWidget/Events/4Filled", stories: [ - // Calendar Widget Stories - StoryCalendarWidgetWTournaments(context), - StoryCalendarWidgetWTournamentsLoading(context), - StoryCalendarWidgetFailedToFetchTournaments(context), - - // Team Card Stories - StoryTeamCard(), - - // Whoops Page Story - WhoopsPageStory(), - - // Events List Widget Stories - EventsListWidgetStory(context), - FailedToLoadEventsListWidgetStory(context), - LoadingEventsListWidgetStory(context), - - // Server Chips List - StoryServerChipsList(context), - ]); - } -} - -Story StoryTeamCard() { - return Story( - name: "EventsListWidget/Events/4Filled", - description: "A card for displaying team information", - builder: (context) { - return TeamCard( - team: ClashTeam( - '1', - 'Mock Team', - 'Tournament 1', - '1', - () { - switch ( - context.knobs.text(label: '# of missing roles', initial: '0')) { - case '0': - return { - Role.TOP: PlayerDetails('123456789', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.BOT: PlayerDetails('5', 'Player 4', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }; - case '1': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.BOT: PlayerDetails('5', 'Player 4', []), - Role.SUPP: null, - }; - case '2': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.BOT: null, - Role.SUPP: null, - }; - case '3': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.JG: null, - Role.BOT: null, - Role.SUPP: null, - }; - case '4': - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: null, - Role.MID: null, - Role.BOT: null, - Role.SUPP: null, - }; - case '5': - return { - Role.TOP: null, - Role.JG: null, - Role.MID: null, - Role.BOT: null, - Role.SUPP: null, - }; - default: - return { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }; - } - }(), - '123456789', - DateTime.now(), - )); - }); -} - -Story WhoopsPageStory() { - return Story( - name: "WhoopsPage", - description: "A page for that the app is not usable.", - builder: (context) { - return const WhoopsPage(); - }, - ); -} - -Story EventsListWidgetStory(BuildContext context) { - DiscordDetailsStore discordDetailsStore = context.read(); - ClashStore clashStoreW5Tournies = new MockClashStore( - context.read().clashBotUser, - [ - ClashTournament('ARAM Clash', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('ARAM Clash', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '3', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '4', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ], - [ - ClashTeam( - '1', - 'Mock Team 1', - 'Mock Tournament 1', - '1', - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '460520499680641035', - DateTime.now(), - ) - ], - ApiCallState.error, - ApiCallState.success, - ApiCallState.success, - new ClashBotServiceImpl( - new UserApi(context.read()), - new TeamApi(context.read()), - new ChampionsApi(context.read()), - new SubscriptionApi(context.read()), - new TentativeApi(context.read()), - new TournamentApi(context.read()), - new ErrorHandlerStore()), - context.read()); - return Story( - name: "EventsListWidget/Events", - builder: (context) { - return EventsListWidget( - clashStore: clashStoreW5Tournies, - ); - }, - ); -} - -Story FailedToLoadEventsListWidgetStory(BuildContext context) { - DiscordDetailsStore discordDetailsStore = context.read(); - ClashStore clashStoreW5Tournies = new MockClashStore( - context.read().clashBotUser, - [ - ClashTournament('ARAM Clash', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('ARAM Clash', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '3', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '4', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ], - [ - ClashTeam( - '1', - 'Mock Team 1', - 'Mock Tournament 1', - '1', - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '460520499680641035', - DateTime.now(), - ) - ], - ApiCallState.success, - ApiCallState.error, - ApiCallState.success, - new ClashBotServiceImpl( - new UserApi(context.read()), - new TeamApi(context.read()), - new ChampionsApi(context.read()), - new SubscriptionApi(context.read()), - new TentativeApi(context.read()), - new TournamentApi(context.read()), - new ErrorHandlerStore()), - context.read()); - return Story( - name: "EventsListWidget/EventsFailedToLoad", - builder: (context) { - return EventsListWidget( - clashStore: clashStoreW5Tournies, - ); - }, - ); -} - -Story LoadingEventsListWidgetStory(BuildContext context) { - DiscordDetailsStore discordDetailsStore = context.read(); - ClashStore clashStoreW5Tournies = new MockClashStore( - context.read().clashBotUser, - [ - ClashTournament('ARAM Clash', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('ARAM Clash', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '1', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '2', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '3', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ClashTournament('Summoner\'s Cup', '4', DateTime.now(), - DateTime.now().add(Duration(days: 1))), - ], - [ - ClashTeam( - '1', - 'Mock Team 1', - 'Mock Tournament 1', - '1', - { - Role.TOP: PlayerDetails('1', 'Player 1', []), - Role.JG: PlayerDetails('2', 'Player 2', []), - Role.MID: PlayerDetails('3', 'Player 3', []), - Role.SUPP: PlayerDetails('5', 'Player 5', []), - }, - '460520499680641035', - DateTime.now(), - ) - ], - ApiCallState.success, - ApiCallState.loading, - ApiCallState.success, - new ClashBotServiceImpl( - new UserApi(context.read()), - new TeamApi(context.read()), - new ChampionsApi(context.read()), - new SubscriptionApi(context.read()), - new TentativeApi(context.read()), - new TournamentApi(context.read()), - new ErrorHandlerStore()), - context.read()); - return Story( - name: "EventsListWidget/EventsLoading", - builder: (context) { - return EventsListWidget( - clashStore: clashStoreW5Tournies, - ); - }, - ); -} - -Story StoryServerChipsList(BuildContext context) { - ApplicationDetailsStore applicationDetailsStore = MockApplicationDetailsStore( - ClashBotUser( - discordId: '123456789', - champions: [], - role: Role.TOP, - serverId: '123456789', - selectedServers: [ - '123456789', - ], - preferredServers: ['123456789', '123456788'], - ), - ['123456789', '123456788'], - context.read(), - context.read(), - context.read(), - context.read()); - - ClashStore clashStore = context.read(); - - return Story( - name: "Widgets/ServerChipsList/filled", - description: "A list of server chips", - builder: (context) { - int numberOfServers = context.knobs - .sliderInt(label: "numberOfServers", initial: 2, max: 5, min: 1); - List servers = buildMockServers(numberOfServers); - return ServerChipList( - appStore: buildApplicationStoreWServers(servers, context), - discordDetailsStore: MockDiscordDetailsStore( - buildMockDiscordGuilds(servers), - DiscordUser('123456789', 'mock_username', '123456789', - "mock_discriminator"), - new DiscordServiceImpl(setupOauth2Helper()), - new ErrorHandlerStore()), - clashStore: clashStore, - ); - }, - ); -} - -buildApplicationStoreWServers(List servers, BuildContext context) { - return MockApplicationDetailsStore( - ClashBotUser( - discordId: '123456789', - champions: [], - role: Role.TOP, - serverId: servers[0], - selectedServers: servers, - preferredServers: servers, - ), - servers, - context.read(), - context.read(), - context.read(), - context.read()); -} - -List buildMockServers(int numberOfServers) { - List servers = []; - for (var i = 0; i < numberOfServers; i++) { - servers.add('server$i'); - } - return servers; -} - -List buildMockDiscordGuilds(List servers) { - List guilds = []; - for (var i = 0; i < servers.length; i++) { - guilds.add(DiscordGuild(servers[i], 'Mock Guild $i', '123456789', false)); - } - return guilds; -} diff --git a/widgetbook/.gitignore b/widgetbook/.gitignore new file mode 100644 index 0000000..79c113f --- /dev/null +++ b/widgetbook/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/widgetbook/.metadata b/widgetbook/.metadata new file mode 100644 index 0000000..4387f5e --- /dev/null +++ b/widgetbook/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "35c388afb57ef061d06a39b537336c87e0e3d1b1" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1 + base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1 + - platform: web + create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1 + base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/widgetbook/README.md b/widgetbook/README.md new file mode 100644 index 0000000..28e23a0 --- /dev/null +++ b/widgetbook/README.md @@ -0,0 +1,3 @@ +# widgetbook + +A new Flutter project. diff --git a/widgetbook/analysis_options.yaml b/widgetbook/analysis_options.yaml new file mode 100644 index 0000000..f9b3034 --- /dev/null +++ b/widgetbook/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml diff --git a/widgetbook/devtools_options.yaml b/widgetbook/devtools_options.yaml new file mode 100644 index 0000000..fa0b357 --- /dev/null +++ b/widgetbook/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/widgetbook/lib/calendar_widget.dart b/widgetbook/lib/calendar_widget.dart new file mode 100644 index 0000000..3db5786 --- /dev/null +++ b/widgetbook/lib/calendar_widget.dart @@ -0,0 +1,166 @@ +import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; +import 'package:clashbot_flutter/globals/global_settings.dart'; +import 'package:clashbot_flutter/models/clash_team.dart'; +import 'package:clashbot_flutter/models/clash_tournament.dart'; +import 'package:clashbot_flutter/models/clashbot_user.dart'; +import 'package:clashbot_flutter/models/discord_guild.dart'; +import 'package:clashbot_flutter/models/discord_user.dart'; +import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; +import 'package:clashbot_flutter/services/discord_service_impl.dart'; +import 'package:clashbot_flutter/services/riot_resources_service_impl.dart'; +import 'package:clashbot_flutter/stores/discord_details.store.dart'; +import 'package:clashbot_flutter/stores/riot_champion.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; +import 'package:flutter/material.dart'; +import 'package:widgetbook/widgetbook.dart'; +import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; + +// Import the widget from your app +import 'package:clashbot_flutter/pages/home/page/widgets/calendar_widget.dart'; +import 'package:widgetbook_workspace/utils/mock_utils.dart'; + +@widgetbook.UseCase(name: 'Loading', type: CalendarWidget) +Widget buildCoolButtonUseCase(BuildContext context) { + List tournaments = buildTournaments(1); + List clashTeams = buildClashTeams(2); + List guilds = buildGuilds(1); + CalendarWidgetDependencies calendarWidgetDependencies = + buildCalendarWidgetDependencies( + tournaments, + clashTeams, + guilds, + ApiCallState.loading, + ApiCallState.loading, + ApiCallState.loading, + ); + return CalendarWidget( + focusedDay: DateTime.now(), + selectedDay: DateTime.now(), + clashStore: calendarWidgetDependencies.clashStore, + discordDetailsStore: calendarWidgetDependencies.discordDetailsStore, + ); +} + +@widgetbook.UseCase(name: 'Default', type: CalendarWidget) +Widget buildCalendarStory(BuildContext context) { + int numberOfTournaments = context.knobs.int.slider( + label: 'Number of Tournaments', + min: 1, + max: 10, + initialValue: 1, + ); + List tournaments = buildTournaments(numberOfTournaments); + List clashTeams = buildClashTeams(2); + List guilds = buildGuilds(1); + CalendarWidgetDependencies calendarWidgetDependencies = + buildCalendarWidgetDependencies( + tournaments, + clashTeams, + guilds, + ApiCallState.success, + ApiCallState.loading, + ApiCallState.loading, + ); + + return CalendarWidget( + focusedDay: DateTime.now(), + selectedDay: DateTime.now(), + clashStore: calendarWidgetDependencies.clashStore, + discordDetailsStore: calendarWidgetDependencies.discordDetailsStore, + ); +} + +@widgetbook.UseCase(name: 'Error', type: CalendarWidget) +Widget buildCalendarStoryError(BuildContext context) { + int numberOfTournaments = context.knobs.int.slider( + label: 'Number of Tournaments', + min: 1, + max: 10, + initialValue: 1, + ); + List tournaments = buildTournaments(numberOfTournaments); + List clashTeams = buildClashTeams(2); + List guilds = buildGuilds(1); + CalendarWidgetDependencies calendarWidgetDependencies = + buildCalendarWidgetDependencies( + tournaments, + clashTeams, + guilds, + ApiCallState.error, + ApiCallState.loading, + ApiCallState.loading, + ); + + return CalendarWidget( + focusedDay: DateTime.now(), + selectedDay: DateTime.now(), + clashStore: calendarWidgetDependencies.clashStore, + discordDetailsStore: calendarWidgetDependencies.discordDetailsStore, + ); +} + +class CalendarWidgetDependencies { + final ClashStore clashStore; + final DiscordDetailsStore discordDetailsStore; + final RiotChampionStore riotChampionStore; + final ErrorHandlerStore errorHandlerStore; + + CalendarWidgetDependencies( + this.clashStore, + this.discordDetailsStore, + this.riotChampionStore, + this.errorHandlerStore, + ); +} + +CalendarWidgetDependencies buildCalendarWidgetDependencies( + List tournaments, + List clashTeams, + List guilds, + ApiCallState tournamentsApiCallState, + ApiCallState teamsApiCallState, + ApiCallState userApiCallState, +) { + DiscordDetailsStore discordDetailsStore = MockDiscordDetailsStore( + guilds, + DiscordUser('1', 'Mock User', 'icon', '1'), + DiscordServiceImpl(setupOauth2Helper()), + ErrorHandlerStore(), + ); + var clashUser = ClashBotUser( + discordId: "1", + champions: [], + role: Role.TOP, + serverId: 'server1', + selectedServers: ['server1'], + preferredServers: ['server1', 'server2'], + ); + var apiClient = ApiClient(); + ClashStore clashStore = MockClashStore( + clashUser, + tournaments, + clashTeams, + tournamentsApiCallState, + teamsApiCallState, + userApiCallState, + ClashBotServiceImpl( + UserApi(apiClient), + TeamApi(apiClient), + ChampionsApi(apiClient), + SubscriptionApi(apiClient), + TentativeApi(apiClient), + TournamentApi(apiClient), + ErrorHandlerStore(), + ), + ErrorHandlerStore(), + ); + clashStore.addCallInProgress('getTournaments'); + return CalendarWidgetDependencies( + clashStore, + discordDetailsStore, + MockRiotChampionStore(RiotResourceServiceImpl(), ErrorHandlerStore()), + ErrorHandlerStore(), + ); +} diff --git a/widgetbook/lib/event_list_widget.dart b/widgetbook/lib/event_list_widget.dart new file mode 100644 index 0000000..c6efc9b --- /dev/null +++ b/widgetbook/lib/event_list_widget.dart @@ -0,0 +1,121 @@ +import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; +import 'package:clashbot_flutter/globals/global_settings.dart'; +import 'package:clashbot_flutter/models/clash_team.dart'; +import 'package:clashbot_flutter/models/clash_tournament.dart'; +import 'package:clashbot_flutter/models/clashbot_user.dart'; +import 'package:clashbot_flutter/models/discord_user.dart'; +import 'package:clashbot_flutter/pages/home/page/widgets/events_widget.dart'; +import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; +import 'package:clashbot_flutter/services/discord_service_impl.dart'; +import 'package:clashbot_flutter/services/riot_resources_service_impl.dart'; +import 'package:clashbot_flutter/stores/application_details.store.dart'; +import 'package:clashbot_flutter/stores/riot_champion.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; +import 'package:flutter/material.dart'; +import 'package:widgetbook_annotation/widgetbook_annotation.dart'; +import 'package:widgetbook_workspace/utils/mock_utils.dart'; + +@UseCase(name: "Default", type: EventsListWidget) +Widget buildEventListWidget(BuildContext context) { + var apiClient = ApiClient(); + var clashBotUser = ClashBotUser( + discordId: "1", + champions: [], + role: Role.TOP, + serverId: 'server1', + selectedServers: ['server1'], + preferredServers: ['server1', 'server2'], + ); + ClashStore clashStoreW5Tournies = new MockClashStore( + clashBotUser, + [ + ClashTournament( + 'ARAM Clash', + '1', + DateTime.now(), + DateTime.now().add(Duration(days: 1)), + ), + ClashTournament( + 'ARAM Clash', + '2', + DateTime.now(), + DateTime.now().add(Duration(days: 1)), + ), + ClashTournament( + 'Summoner\'s Cup', + '1', + DateTime.now(), + DateTime.now().add(Duration(days: 1)), + ), + ClashTournament( + 'Summoner\'s Cup', + '2', + DateTime.now(), + DateTime.now().add(Duration(days: 1)), + ), + ClashTournament( + 'Summoner\'s Cup', + '3', + DateTime.now(), + DateTime.now().add(Duration(days: 1)), + ), + ClashTournament( + 'Summoner\'s Cup', + '4', + DateTime.now(), + DateTime.now().add(Duration(days: 1)), + ), + ], + [ + ClashTeam( + '1', + 'Mock Team 1', + 'Mock Tournament 1', + '1', + { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }, + '460520499680641035', + DateTime.now(), + ), + ], + ApiCallState.error, + ApiCallState.success, + ApiCallState.success, + ClashBotServiceImpl( + UserApi(apiClient), + TeamApi(apiClient), + ChampionsApi(apiClient), + SubscriptionApi(apiClient), + TentativeApi(apiClient), + TournamentApi(apiClient), + ErrorHandlerStore(), + ), + ErrorHandlerStore(), + ); + var mockDiscordDetailsStore = MockDiscordDetailsStore( + buildGuilds(2), + DiscordUser('1', 'Mock User', 'Mock#0001', 'avatar'), + DiscordServiceImpl(setupOauth2Helper()), + ErrorHandlerStore(), + ); + var mockServers = buildMockServers(2); + var applicationDetailsStore = MockApplicationDetailsStore( + clashBotUser, + mockServers, + clashStoreW5Tournies, + mockDiscordDetailsStore, + RiotChampionStore(RiotResourceServiceImpl(), ErrorHandlerStore()), + ErrorHandlerStore(), + ); + return EventsListWidget( + clashStore: clashStoreW5Tournies, + applicationDetailsStore: applicationDetailsStore, + discordDetailStore: mockDiscordDetailsStore, + ); +} diff --git a/widgetbook/lib/main.dart b/widgetbook/lib/main.dart new file mode 100644 index 0000000..e246239 --- /dev/null +++ b/widgetbook/lib/main.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:widgetbook/widgetbook.dart'; +import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; + +import 'main.directories.g.dart'; + +void main() { + runApp(const MainApp()); +} + +@widgetbook.App() +class MainApp extends StatelessWidget { + const MainApp({super.key}); + + @override + Widget build(BuildContext context) { + return Widgetbook.material( + directories: directories, + lightTheme: ThemeData.light(), + darkTheme: ThemeData.dark(), + addons: [ + MaterialThemeAddon( + themes: [ + WidgetbookTheme(name: 'Light', data: ThemeData.light()), + WidgetbookTheme(name: 'Dark', data: ThemeData.dark()), + ], + ), + ], + ); + } +} diff --git a/widgetbook/lib/server_list_widget.dart b/widgetbook/lib/server_list_widget.dart new file mode 100644 index 0000000..05fa2ea --- /dev/null +++ b/widgetbook/lib/server_list_widget.dart @@ -0,0 +1,125 @@ +import 'package:clashbot_flutter/pages/home/page/widgets/server_chip_list.dart'; +import 'package:flutter/widgets.dart'; +import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; +import 'package:clashbot_flutter/globals/global_settings.dart'; +import 'package:clashbot_flutter/services/discord_service_impl.dart'; +import 'package:clashbot_flutter/services/riot_resources_service_impl.dart'; +import 'package:clashbot_flutter/models/clash_team.dart'; +import 'package:clashbot_flutter/models/clash_tournament.dart'; +import 'package:clashbot_flutter/models/clashbot_user.dart'; +import 'package:clashbot_flutter/models/discord_guild.dart'; +import 'package:clashbot_flutter/models/discord_user.dart'; +import 'package:clashbot_flutter/pages/home/page/home_v2.dart'; +import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; +import 'package:clashbot_flutter/stores/application_details.store.dart'; +import 'package:clashbot_flutter/stores/discord_details.store.dart'; +import 'package:clashbot_flutter/stores/riot_champion.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; +import 'package:flutter/material.dart'; +import 'package:mobx/mobx.dart'; +import 'package:provider/provider.dart'; +import 'package:widgetbook/widgetbook.dart'; +import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; +import 'package:widgetbook_workspace/utils/mock_utils.dart'; + +@widgetbook.UseCase(name: "Default", type: ServerChipList) +Widget buildServerListWidget(BuildContext context) { + int numberOfServers = context.knobs.int.slider( + label: "Number of Servers", + initialValue: 1, + max: 5, + min: 1, + ); + List servers = buildMockServers(numberOfServers); + ServerChipListDependencies serverChipListDependencies = + buildServerChipListDependencies( + clashState: ApiCallState.success, + tentativeState: ApiCallState.success, + subscriptionState: ApiCallState.success, + servers: servers, + ); + return Center( + child: ServerChipList( + appStore: serverChipListDependencies.appStore, + discordDetailsStore: serverChipListDependencies.discordDetailsStore, + clashStore: serverChipListDependencies.clashStore, + ), + ); +} + +class ServerChipListDependencies { + final ApplicationDetailsStore appStore; + final DiscordDetailsStore discordDetailsStore; + final ClashStore clashStore; + + ServerChipListDependencies({ + required this.appStore, + required this.discordDetailsStore, + required this.clashStore, + }); +} + +ServerChipListDependencies buildServerChipListDependencies({ + required ApiCallState clashState, + required ApiCallState tentativeState, + required ApiCallState subscriptionState, + required List servers, +}) { + final mockUser = ClashBotUser( + discordId: '123456789', + champions: [], + role: Role.TOP, + serverId: servers[0], + selectedServers: servers, + preferredServers: servers, + ); + + final errorHandlerStore = ErrorHandlerStore(); + final mockDiscordUser = DiscordUser( + '123456789', + 'mock_username', + '123456789', + "mock_discriminator", + ); + + final mockClashStore = MockClashStore( + mockUser, + ObservableList.of([]), + ObservableList.of([]), + clashState, + tentativeState, + subscriptionState, + ClashBotServiceImpl( + UserApi(), + TeamApi(), + ChampionsApi(), + SubscriptionApi(), + TentativeApi(), + TournamentApi(), + errorHandlerStore, + ), + errorHandlerStore, + ); + + final mockDiscordDetailsStore = MockDiscordDetailsStore( + buildMockDiscordGuilds(servers), + mockDiscordUser, + DiscordServiceImpl(setupOauth2Helper()), + errorHandlerStore, + ); + + return ServerChipListDependencies( + appStore: MockApplicationDetailsStore( + mockUser, + servers, + mockClashStore, + mockDiscordDetailsStore, + RiotChampionStore(RiotResourceServiceImpl(), errorHandlerStore), + errorHandlerStore, + ), + clashStore: mockClashStore, + discordDetailsStore: mockDiscordDetailsStore, + ); +} diff --git a/widgetbook/lib/team_card_widget.dart b/widgetbook/lib/team_card_widget.dart new file mode 100644 index 0000000..9e5f4cc --- /dev/null +++ b/widgetbook/lib/team_card_widget.dart @@ -0,0 +1,139 @@ +import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; +import 'package:clashbot_flutter/globals/global_settings.dart'; +import 'package:clashbot_flutter/models/clash_team.dart'; +import 'package:clashbot_flutter/models/clashbot_user.dart'; +import 'package:clashbot_flutter/models/discord_user.dart'; +import 'package:clashbot_flutter/pages/home/page/widgets/team_card.dart'; +import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; +import 'package:clashbot_flutter/services/discord_service_impl.dart'; +import 'package:clashbot_flutter/services/riot_resources_service_impl.dart'; +import 'package:clashbot_flutter/stores/riot_champion.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; +import 'package:flutter/material.dart'; +import 'package:widgetbook/widgetbook.dart'; +import 'package:widgetbook_annotation/widgetbook_annotation.dart'; +import 'package:widgetbook_workspace/utils/mock_utils.dart'; + +@UseCase(name: "Default", type: TeamCard) +Widget buildTeamCardWidget(BuildContext context) { + var clashUser = ClashBotUser( + discordId: "1", + champions: [], + role: Role.TOP, + serverId: 'server1', + selectedServers: ['server1'], + preferredServers: ['server1', 'server2'], + ); + var mockServers = buildMockServers(2); + var apiClient = ApiClient(); + var mockDiscordDetailsStore = MockDiscordDetailsStore( + buildGuilds(2), + DiscordUser('1', 'Mock User', 'Mock#0001', 'avatar'), + DiscordServiceImpl(setupOauth2Helper()), + ErrorHandlerStore(), + ); + var mockApplicationDetailsStore = new MockApplicationDetailsStore( + clashUser, + mockServers, + MockClashStore( + clashUser, + buildTournaments(2), + buildClashTeams(2), + ApiCallState.success, + ApiCallState.success, + ApiCallState.success, + ClashBotServiceImpl( + UserApi(apiClient), + TeamApi(apiClient), + ChampionsApi(apiClient), + SubscriptionApi(apiClient), + TentativeApi(apiClient), + TournamentApi(apiClient), + ErrorHandlerStore(), + ), + ErrorHandlerStore(), + ), + mockDiscordDetailsStore, + MockRiotChampionStore(RiotResourceServiceImpl(), ErrorHandlerStore()), + ErrorHandlerStore(), + ); + return Center( + child: TeamCard( + applicationDetailsStore: mockApplicationDetailsStore, + discordDetailsStore: mockDiscordDetailsStore, + team: ClashTeam( + '1', + 'Mock Team', + 'Tournament 1', + '1', + () { + switch (context.knobs.int.slider( + label: '# of missing roles', + initialValue: 0, + max: 5, + min: 0, + )) { + case 0: + return { + Role.TOP: PlayerDetails('123456789', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.BOT: PlayerDetails('5', 'Player 4', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }; + case 1: + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.BOT: PlayerDetails('5', 'Player 4', []), + Role.SUPP: null, + }; + case 2: + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.BOT: null, + Role.SUPP: null, + }; + case 3: + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.JG: null, + Role.BOT: null, + Role.SUPP: null, + }; + case 4: + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: null, + Role.MID: null, + Role.BOT: null, + Role.SUPP: null, + }; + case 5: + return { + Role.TOP: null, + Role.JG: null, + Role.MID: null, + Role.BOT: null, + Role.SUPP: null, + }; + default: + return { + Role.TOP: PlayerDetails('1', 'Player 1', []), + Role.JG: PlayerDetails('2', 'Player 2', []), + Role.MID: PlayerDetails('3', 'Player 3', []), + Role.SUPP: PlayerDetails('5', 'Player 5', []), + }; + } + }(), + '123456789', + DateTime.now(), + ), + ), + ); +} diff --git a/widgetbook/lib/utils/mock_utils.dart b/widgetbook/lib/utils/mock_utils.dart new file mode 100644 index 0000000..7521212 --- /dev/null +++ b/widgetbook/lib/utils/mock_utils.dart @@ -0,0 +1,140 @@ +import 'package:clash_bot_api/api.dart'; +import 'package:clashbot_flutter/enums/api_call_state.dart'; +import 'package:clashbot_flutter/globals/global_settings.dart'; +import 'package:clashbot_flutter/models/clash_team.dart'; +import 'package:clashbot_flutter/models/clash_tournament.dart'; +import 'package:clashbot_flutter/models/clashbot_user.dart'; +import 'package:clashbot_flutter/models/discord_guild.dart'; +import 'package:clashbot_flutter/models/discord_user.dart'; +import 'package:clashbot_flutter/pages/home/page/home_v2.dart'; +import 'package:clashbot_flutter/services/clashbot_service_impl.dart'; +import 'package:clashbot_flutter/services/discord_service_impl.dart'; +import 'package:clashbot_flutter/services/riot_resources_service_impl.dart'; +import 'package:clashbot_flutter/stores/application_details.store.dart'; +import 'package:clashbot_flutter/stores/discord_details.store.dart'; +import 'package:clashbot_flutter/stores/riot_champion.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/clash.store.dart'; +import 'package:clashbot_flutter/stores/v2-stores/error_handler.store.dart'; +import 'package:flutter/material.dart'; +import 'package:mobx/mobx.dart'; + +List buildTournaments(int count) { + return List.generate( + count, + (index) => ClashTournament( + 'Tournament $index', + '$index', + DateTime.now(), + DateTime.now().add(Duration(days: 1)), + ), + ); +} + +List buildClashTeams(int count) { + return List.generate( + count, + (index) => ClashTeam( + '$index', + 'Mock Team $index', + 'Mock Tournament $index', + '$index', + { + Role.TOP: PlayerDetails('$index', 'Player $index', []), + Role.JG: PlayerDetails('${index + 1}', 'Player ${index + 1}', []), + Role.MID: PlayerDetails('${index + 2}', 'Player ${index + 2}', []), + Role.SUPP: PlayerDetails('${index + 3}', 'Player ${index + 3}', []), + }, + '123456789', + DateTime.now(), + ), + ); +} + +List buildGuilds(int count) { + return List.generate( + count, + (index) => DiscordGuildWColor( + id: '$index', + name: 'Mock Guild $index', + icon: 'icon', + owner: index == 0, + color: Colors.primaries[index % Colors.primaries.length], + ), + ); +} + +class MockApplicationDetailsStore extends ApplicationDetailsStore { + MockApplicationDetailsStore( + ClashBotUser mockClashBotUser, + List mockPreferredServers, + super._clashStore, + super._discordDetailsStore, + super._riotChampionStore, + super._errorHandlerStore, + ) { + clashBotUser = mockClashBotUser; + clashBotUser.preferredServers = ObservableList.of(mockPreferredServers); + } +} + +class MockDiscordDetailsStore extends DiscordDetailsStore { + MockDiscordDetailsStore( + List guilds, + DiscordUser discordUser, + super.discordService, + super._errorHandlerStore, + ) { + discordGuilds = ObservableList.of(guilds); + this.discordUser = discordUser; + } +} + +class MockClashStore extends ClashStore { + ApiCallState originalTournamentsApiCallState = ApiCallState.success; + MockClashStore( + ClashBotUser clashBotUser, + List tournaments, + List clashTeams, + ApiCallState tournamentsApiCallStateToBeSet, + ApiCallState teamsApiCallState, + ApiCallState userApiCallState, + super._clashService, + super._errorhandlerStore, + ) { + this.tournamentsApiCallState = tournamentsApiCallStateToBeSet; + this.originalTournamentsApiCallState = tournamentsApiCallStateToBeSet; + this.teamsApiCallState = teamsApiCallState; + this.userApiCallState = userApiCallState; + this.clashBotUser = clashBotUser; + this.tournaments = ObservableList.of(tournaments); + this.clashTeams = ObservableList.of(clashTeams); + } + + @override + Future refreshClashTournaments(String id) async { + setTournamentsApiCallState(ApiCallState.loading); + await Future.delayed(Duration(seconds: 1), () { + setTournamentsApiCallState(originalTournamentsApiCallState); + }); + } +} + +class MockRiotChampionStore extends RiotChampionStore { + MockRiotChampionStore(super._riotResourcesService, super._errorHandlerStore); +} + +List buildMockServers(int numberOfServers) { + List servers = []; + for (var i = 0; i < numberOfServers; i++) { + servers.add('$i'); + } + return servers; +} + +List buildMockDiscordGuilds(List servers) { + List guilds = []; + for (var i = 0; i < servers.length; i++) { + guilds.add(DiscordGuild(servers[i], 'Mock Guild $i', '123456789', false)); + } + return guilds; +} diff --git a/widgetbook/pubspec.lock b/widgetbook/pubspec.lock new file mode 100644 index 0000000..8cca6da --- /dev/null +++ b/widgetbook/pubspec.lock @@ -0,0 +1,1277 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" + url: "https://pub.dev" + source: hosted + version: "76.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "7fd72d77a7487c26faab1d274af23fb008763ddc10800261abbfb2c067f183d5" + url: "https://pub.dev" + source: hosted + version: "1.3.53" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.3" + accessibility_tools: + dependency: transitive + description: + name: accessibility_tools + sha256: "1ee3612b9439ca315f92dcc31c6a4828e95b96c1aa64ac3a7776c149722deca8" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" + url: "https://pub.dev" + source: hosted + version: "6.11.0" + animated_text_kit: + dependency: "direct main" + description: + name: animated_text_kit + sha256: adba517adb7e6adeb1eb5e1c8a147dd7bc664dfdf2f5e92226b572a91393a93d + url: "https://pub.dev" + source: hosted + version: "4.2.3" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + build: + dependency: transitive + description: + name: build + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_config: + dependency: transitive + description: + name: build_config + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa" + url: "https://pub.dev" + source: hosted + version: "4.0.4" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573" + url: "https://pub.dev" + source: hosted + version: "2.4.14" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" + url: "https://pub.dev" + source: hosted + version: "8.0.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 + url: "https://pub.dev" + source: hosted + version: "8.9.5" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clash_bot_api: + dependency: "direct main" + description: + path: "../clash-bot-api" + relative: true + source: path + version: "1.0.1" + clashbot_flutter: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.0+1" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" + collection: + dependency: "direct main" + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820" + url: "https://pub.dev" + source: hosted + version: "2.3.8" + dev: + dependency: "direct main" + description: + name: dev + sha256: e7e806af20d53e293a7878212d2246d3e9fccd2b49d597600f9898ed83501cb4 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + device_frame: + dependency: transitive + description: + name: device_frame + sha256: d031a06f5d6f4750009672db98a5aa1536aa4a231713852469ce394779a23d75 + url: "https://pub.dev" + source: hosted + version: "1.2.0" + envied: + dependency: "direct main" + description: + name: envied + sha256: a4e2b1d0caa479b5d61332ae516518c175a6d09328a35a0bc0a53894cc5d7e4d + url: "https://pub.dev" + source: hosted + version: "1.1.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + ffi: + dependency: transitive + description: + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + firebase_analytics: + dependency: "direct main" + description: + name: firebase_analytics + sha256: "81a582e9348216fcf6b30878487369325bf78b8ddd752ed176949c8e4fd4aaac" + url: "https://pub.dev" + source: hosted + version: "11.4.4" + firebase_analytics_platform_interface: + dependency: transitive + description: + name: firebase_analytics_platform_interface + sha256: "5ae7bd4a551b67009cd0676f5407331b202eaf16e0a80dcf7b40cd0a34a18746" + url: "https://pub.dev" + source: hosted + version: "4.3.4" + firebase_analytics_web: + dependency: "direct main" + description: + name: firebase_analytics_web + sha256: "15fd7459fea2a00958dbf9b86cd8ad14d3ce2db13950308af7c7717e89ccc5c2" + url: "https://pub.dev" + source: hosted + version: "0.5.10+10" + firebase_core: + dependency: transitive + description: + name: firebase_core + sha256: f4d8f49574a4e396f34567f3eec4d38ab9c3910818dec22ca42b2a467c685d8b + url: "https://pub.dev" + source: hosted + version: "3.12.1" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: d7253d255ff10f85cfd2adaba9ac17bae878fa3ba577462451163bd9f1d1f0bf + url: "https://pub.dev" + source: hosted + version: "5.4.0" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: faa5a76f6380a9b90b53bc3bdcb85bc7926a382e0709b9b5edac9f7746651493 + url: "https://pub.dev" + source: hosted + version: "2.21.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_animate: + dependency: "direct main" + description: + name: flutter_animate + sha256: "7befe2d3252728afb77aecaaea1dec88a89d35b9b1d2eea6d04479e8af9117b5" + url: "https://pub.dev" + source: hosted + version: "4.5.2" + flutter_highlight: + dependency: transitive + description: + name: flutter_highlight + sha256: "7b96333867aa07e122e245c033b8ad622e4e3a42a1a2372cbb098a2541d8782c" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_mobx: + dependency: "direct main" + description: + name: flutter_mobx + sha256: ba5e93467866a2991259dc51cffd41ef45f695c667c2b8e7b087bf24118b50fe + url: "https://pub.dev" + source: hosted + version: "2.3.0" + flutter_neat_and_clean_calendar: + dependency: "direct main" + description: + name: flutter_neat_and_clean_calendar + sha256: cfdd57bdd9b8b60109e6ceeb436782084fd4c467ae193109f2c9b2770e644c41 + url: "https://pub.dev" + source: hosted + version: "0.4.16" + flutter_platform_widgets: + dependency: transitive + description: + name: flutter_platform_widgets + sha256: "84f39540cf433aa44b235b7fca6518d1bd30aa281d8196f00be60bc76cac96f4" + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter_secure_storage: + dependency: transitive + description: + name: flutter_secure_storage + sha256: "22dbf16f23a4bcf9d35e51be1c84ad5bb6f627750565edd70dab70f3ff5fff8f" + url: "https://pub.dev" + source: hosted + version: "8.1.0" + flutter_secure_storage_linux: + dependency: transitive + description: + name: flutter_secure_storage_linux + sha256: bf7404619d7ab5c0a1151d7c4e802edad8f33535abfbeff2f9e1fe1274e2d705 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + flutter_secure_storage_macos: + dependency: transitive + description: + name: flutter_secure_storage_macos + sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 + url: "https://pub.dev" + source: hosted + version: "1.1.2" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: "38f9501c7cb6f38961ef0e1eacacee2b2d4715c63cc83fe56449c4d3d0b47255" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + flutter_shaders: + dependency: transitive + description: + name: flutter_shaders + sha256: "34794acadd8275d971e02df03afee3dee0f98dbfb8c4837082ad0034f612a3e2" + url: "https://pub.dev" + source: hosted + version: "0.1.3" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + url: "https://pub.dev" + source: hosted + version: "2.0.9" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_auth_2: + dependency: transitive + description: + name: flutter_web_auth_2 + sha256: "0da41e631a368e02366fc1a9b79dd8da191e700a836878bc54466fff51c07df2" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_web_auth_2_platform_interface: + dependency: transitive + description: + name: flutter_web_auth_2_platform_interface + sha256: f6fa7059ff3428c19cd756c02fef8eb0147131c7e64591f9060c90b5ab84f094 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + gestures: + dependency: transitive + description: + name: gestures + sha256: "6e75e4ba1ad033a8be9a682974dfe6a2be96ab07b4aa8335ed37bbecb75b7770" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + go_router: + dependency: "direct main" + description: + name: go_router + sha256: bd7e671d26fd39c78cba82070fa34ef1f830b0e7ed1aeebccabc6561302a7ee5 + url: "https://pub.dev" + source: hosted + version: "6.5.9" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + highlight: + dependency: transitive + description: + name: highlight + sha256: "5353a83ffe3e3eca7df0abfb72dcf3fa66cc56b953728e7113ad4ad88497cf21" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + http: + dependency: "direct main" + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" + source: hosted + version: "0.13.6" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + inspector: + dependency: transitive + description: + name: inspector + sha256: "40ba0ac1c819c85139bfec9d1e283804581a8985c91f19d00e93212cf29226b1" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.dev" + source: hosted + version: "0.18.1" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" + url: "https://pub.dev" + source: hosted + version: "0.1.3-main.0" + markdown: + dependency: transitive + description: + name: markdown + sha256: "935e23e1ff3bc02d390bad4d4be001208ee92cc217cb5b5a6c19bc14aaa318c1" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + markdown_widget: + dependency: "direct main" + description: + name: markdown_widget + sha256: "216dced98962d7699a265344624bc280489d739654585ee881c95563a3252fac" + url: "https://pub.dev" + source: hosted + version: "2.3.2+6" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + mobx: + dependency: "direct main" + description: + name: mobx + sha256: bf1a90e5bcfd2851fc6984e20eef69557c65d9e4d0a88f5be4cf72c9819ce6b0 + url: "https://pub.dev" + source: hosted + version: "2.5.0" + mobx_codegen: + dependency: "direct main" + description: + name: mobx_codegen + sha256: "990da80722f7d7c0017dec92040b31545d625b15d40204c36a1e63d167c73cdc" + url: "https://pub.dev" + source: hosted + version: "2.7.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + oauth2: + dependency: "direct main" + description: + name: oauth2 + sha256: c4013ef62be37744efdc0861878fd9e9285f34db1f9e331cc34100d7674feb42 + url: "https://pub.dev" + source: hosted + version: "2.0.2" + oauth2_client: + dependency: "direct main" + description: + name: oauth2_client + sha256: "9dbbe72548d769d7e37fdfe571d09094a7635449ad8a54c31b64003935e76330" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" + url: "https://pub.dev" + source: hosted + version: "6.1.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pointer_interceptor: + dependency: transitive + description: + name: pointer_interceptor + sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 + url: "https://pub.dev" + source: hosted + version: "0.9.3+7" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: "direct main" + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + random_string: + dependency: transitive + description: + name: random_string + sha256: "03b52435aae8cbdd1056cf91bfc5bf845e9706724dd35ae2e99fa14a1ef79d02" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + resizable_widget: + dependency: transitive + description: + name: resizable_widget + sha256: db2919754b93f386b9b3fb15e9f48f6c9d6d41f00a24397629133c99df86606a + url: "https://pub.dev" + source: hosted + version: "1.0.5" + retry: + dependency: "direct main" + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + scroll_to_index: + dependency: transitive + description: + name: scroll_to_index + sha256: b707546e7500d9f070d63e5acf74fd437ec7eeeb68d3412ef7b0afada0b4f176 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: "846849e3e9b68f3ef4b60c60cf4b3e02e9321bc7f4d8c4692cf87ffa82fc8a3a" + url: "https://pub.dev" + source: hosted + version: "2.5.2" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad" + url: "https://pub.dev" + source: hosted + version: "2.4.8" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" + url: "https://pub.dev" + source: hosted + version: "2.5.4" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + simple_gesture_detector: + dependency: transitive + description: + name: simple_gesture_detector + sha256: ba2cd5af24ff20a0b8d609cec3f40e5b0744d2a71804a2616ae086b9c19d19a3 + url: "https://pub.dev" + source: hosted + version: "0.2.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stomp_dart_client: + dependency: "direct main" + description: + name: stomp_dart_client + sha256: "8779d1383f0a6faa0623af27ab6d4b228ab76c75020d9a83ade5ee204eac5153" + url: "https://pub.dev" + source: hosted + version: "0.4.4" + storybook_flutter: + dependency: "direct main" + description: + name: storybook_flutter + sha256: "68f07d2caf16bd34e9cfbc479d60298a6568abfac552ea1998ef724344c6cc13" + url: "https://pub.dev" + source: hosted + version: "0.14.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + table_calendar: + dependency: "direct main" + description: + name: table_calendar + sha256: "1e3521a3e6d3fc7f645a58b135ab663d458ab12504f1ea7f9b4b81d47086c478" + url: "https://pub.dev" + source: hosted + version: "3.0.9" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + timing: + dependency: transitive + description: + name: timing + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "1d0eae19bd7606ef60fe69ef3b312a437a16549476c42321d5dc1506c9ca3bf4" + url: "https://pub.dev" + source: hosted + version: "6.3.15" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77" + url: "https://pub.dev" + source: hosted + version: "3.1.4" + uuid: + dependency: "direct main" + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" + validators: + dependency: "direct main" + description: + name: validators + sha256: "884515951f831a9c669a41ed6c4d3c61c2a0e8ec6bca761a4480b28e99cecf5d" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + url: "https://pub.dev" + source: hosted + version: "1.1.10+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + url: "https://pub.dev" + source: hosted + version: "1.1.10+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + url: "https://pub.dev" + source: hosted + version: "1.1.10+1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + widgetbook: + dependency: "direct main" + description: + name: widgetbook + sha256: "43fb5d65e5617cae47aeb5b25d6c8c51ee44bb5296b9a72df7bd60dbc6c51877" + url: "https://pub.dev" + source: hosted + version: "3.11.0" + widgetbook_annotation: + dependency: "direct main" + description: + name: widgetbook_annotation + sha256: b6f1da292c20a6238d973a640d253ce3ebddbe1f9fa8f2afd72624797a38e7cc + url: "https://pub.dev" + source: hosted + version: "3.3.0" + widgetbook_generator: + dependency: "direct dev" + description: + name: widgetbook_generator + sha256: ac59f4208daf449c104fccfab77d210e53e92b8a52b74f51a81666418c9a6023 + url: "https://pub.dev" + source: hosted + version: "3.10.0" + window_to_front: + dependency: transitive + description: + name: window_to_front + sha256: "7aef379752b7190c10479e12b5fd7c0b9d92adc96817d9e96c59937929512aee" + url: "https://pub.dev" + source: hosted + version: "0.0.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/widgetbook/pubspec.yaml b/widgetbook/pubspec.yaml new file mode 100644 index 0000000..2755f9d --- /dev/null +++ b/widgetbook/pubspec.yaml @@ -0,0 +1,65 @@ +name: widgetbook_workspace +description: "A new Flutter project." +publish_to: 'none' +version: 0.1.0 + +environment: + sdk: ^3.7.0 + +dependencies: + flutter: + sdk: flutter + widgetbook: ^3.11.0 + widgetbook_annotation: ^3.3.0 + cupertino_icons: ^1.0.2 + table_calendar: ^3.0.9 + go_router: ^6.2.0 + shared_preferences: ^2.0.18 + provider: ^6.0.5 + oauth2: ^2.0.1 + dev: ^1.0.0 + mobx_codegen: ^2.1.1 + mobx: ^2.1.4 + flutter_mobx: ^2.0.6+5 + http: ^0.13.5 + oauth2_client: ^3.2.1 + clash_bot_api: + path: ../clash-bot-api + animated_text_kit: ^4.2.2 + storybook_flutter: ^0.14.1 + validators: ^3.0.0 + retry: ^3.1.1 + stomp_dart_client: ^0.4.4 + collection: ^1.17.0 + flutter_animate: ^4.1.1+1 + uuid: ^3.0.7 + envied: ^1.1.1 + markdown_widget: ^2.3.2+6 + url_launcher: ^6.3.1 + firebase_analytics: ^11.4.4 + firebase_analytics_web: ^0.5.10+10 + intl: ^0.18.1 + flutter_neat_and_clean_calendar: ^0.4.16 + flutter_svg: ^2.0.9 + clashbot_flutter: + path: ../ + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + widgetbook_generator: ^3.10.0 + build_runner: ^2.3.3 + +flutter: + uses-material-design: true + + +assets: + - ../assets/markdown/privacy-policy.md + - ../images/TopIcon.webp + - ../images/BotIcon.webp + - ../images/MidIcon.webp + - ../images/JGIcon.webp + - ../images/SuppIcon.webp + - ../svgs/ClashBot-HomePage.svg \ No newline at end of file diff --git a/widgetbook/web/favicon.png b/widgetbook/web/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..8aaa46ac1ae21512746f852a42ba87e4165dfdd1 GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0X7 zltGxWVyS%@P(fs7NJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8ErclUHn2 zVXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1AfjnEK zjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf|i<65o z3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp$>4P^%3{)XKjo zGZknv$b36P8?Z_gF{nK@`XI}Z90TzwSQO}0J1!f2c(B=V`5aP@1P1a|PZ!4!3&Gl8 zTYqUsf!gYFyJnXpu0!n&N*SYAX-%d(5gVjrHJWqXQshj@!Zm{!01WsQrH~9=kTxW#6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM literal 0 HcmV?d00001 diff --git a/widgetbook/web/icons/Icon-192.png b/widgetbook/web/icons/Icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..b749bfef07473333cf1dd31e9eed89862a5d52aa GIT binary patch literal 5292 zcmZ`-2T+sGz6~)*FVZ`aW+(v>MIm&M-g^@e2u-B-DoB?qO+b1Tq<5uCCv>ESfRum& zp%X;f!~1{tzL__3=gjVJ=j=J>+nMj%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ook/web/icons/Icon-512.png b/widgetbook/web/icons/Icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..88cfd48dff1169879ba46840804b412fe02fefd6 GIT binary patch literal 8252 zcmd5=2T+s!lYZ%-(h(2@5fr2dC?F^$C=i-}R6$UX8af(!je;W5yC_|HmujSgN*6?W z3knF*TL1$|?oD*=zPbBVex*RUIKsL<(&Rj9%^UD2IK3W?2j>D?eWQgvS-HLymHo9%~|N2Q{~j za?*X-{b9JRowv_*Mh|;*-kPFn>PI;r<#kFaxFqbn?aq|PduQg=2Q;~Qc}#z)_T%x9 zE|0!a70`58wjREmAH38H1)#gof)U3g9FZ^ zF7&-0^Hy{4XHWLoC*hOG(dg~2g6&?-wqcpf{ z&3=o8vw7lMi22jCG9RQbv8H}`+}9^zSk`nlR8?Z&G2dlDy$4#+WOlg;VHqzuE=fM@ z?OI6HEJH4&tA?FVG}9>jAnq_^tlw8NbjNhfqk2rQr?h(F&WiKy03Sn=-;ZJRh~JrD zbt)zLbnabttEZ>zUiu`N*u4sfQaLE8-WDn@tHp50uD(^r-}UsUUu)`!Rl1PozAc!a z?uj|2QDQ%oV-jxUJmJycySBINSKdX{kDYRS=+`HgR2GO19fg&lZKyBFbbXhQV~v~L za^U944F1_GtuFXtvDdDNDvp<`fqy);>Vw=ncy!NB85Tw{&sT5&Ox%-p%8fTS;OzlRBwErvO+ROe?{%q-Zge=%Up|D4L#>4K@Ke=x%?*^_^P*KD zgXueMiS63!sEw@fNLB-i^F|@Oib+S4bcy{eu&e}Xvb^(mA!=U=Xr3||IpV~3K zQWzEsUeX_qBe6fky#M zzOJm5b+l;~>=sdp%i}}0h zO?B?i*W;Ndn02Y0GUUPxERG`3Bjtj!NroLoYtyVdLtl?SE*CYpf4|_${ku2s`*_)k zN=a}V8_2R5QANlxsq!1BkT6$4>9=-Ix4As@FSS;1q^#TXPrBsw>hJ}$jZ{kUHoP+H zvoYiR39gX}2OHIBYCa~6ERRPJ#V}RIIZakUmuIoLF*{sO8rAU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97YZXIo@y!QgFWddJ3|0`sjFx!m))><{BI=FK%f8s literal 0 HcmV?d00001 diff --git a/widgetbook/web/icons/Icon-maskable-192.png b/widgetbook/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9b4d76e525556d5d89141648c724331630325d GIT binary patch literal 5594 zcmdT|`#%%j|KDb2V@0DPm$^(Lx5}lO%Yv(=e*7hl@QqKS50#~#^IQPxBmuh|i9sXnt4ch@VT0F7% zMtrs@KWIOo+QV@lSs66A>2pz6-`9Jk=0vv&u?)^F@HZ)-6HT=B7LF;rdj zskUyBfbojcX#CS>WrIWo9D=DIwcXM8=I5D{SGf$~=gh-$LwY?*)cD%38%sCc?5OsX z-XfkyL-1`VavZ?>(pI-xp-kYq=1hsnyP^TLb%0vKRSo^~r{x?ISLY1i7KjSp z*0h&jG(Rkkq2+G_6eS>n&6>&Xk+ngOMcYrk<8KrukQHzfx675^^s$~<@d$9X{VBbg z2Fd4Z%g`!-P}d#`?B4#S-9x*eNlOVRnDrn#jY@~$jfQ-~3Od;A;x-BI1BEDdvr`pI z#D)d)!2_`GiZOUu1crb!hqH=ezs0qk<_xDm_Kkw?r*?0C3|Io6>$!kyDl;eH=aqg$B zsH_|ZD?jP2dc=)|L>DZmGyYKa06~5?C2Lc0#D%62p(YS;%_DRCB1k(+eLGXVMe+=4 zkKiJ%!N6^mxqM=wq`0+yoE#VHF%R<{mMamR9o_1JH8jfnJ?NPLs$9U!9!dq8 z0B{dI2!M|sYGH&9TAY34OlpIsQ4i5bnbG>?cWwat1I13|r|_inLE?FS@Hxdxn_YZN z3jfUO*X9Q@?HZ>Q{W0z60!bbGh557XIKu1?)u|cf%go`pwo}CD=0tau-}t@R2OrSH zQzZr%JfYa`>2!g??76=GJ$%ECbQh7Q2wLRp9QoyiRHP7VE^>JHm>9EqR3<$Y=Z1K^SHuwxCy-5@z3 zVM{XNNm}yM*pRdLKp??+_2&!bp#`=(Lh1vR{~j%n;cJv~9lXeMv)@}Odta)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gKfL&lX^$Z>Cpu&6)6jvi^Z! literal 0 HcmV?d00001 diff --git a/widgetbook/web/icons/Icon-maskable-512.png b/widgetbook/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000000000000000000000000000000000..d69c56691fbdb0b7efa65097c7cc1edac12a6d3e GIT binary patch literal 20998 zcmeFZ_gj-)&^4Nb2tlbLMU<{!p(#yjqEe+=0IA_oih%ScH9@5#MNp&}Y#;;(h=A0@ zh7{>lT2MkSQ344eAvrhici!td|HJuyvJm#Y_w1Q9Yu3!26dNlO-oxUDK_C#XnW^Co z5C{VN6#{~B0)K2j7}*1Xq(Nqemv23A-6&=ZpEijkVnSwVGqLv40?n0=p;k3-U5e5+ z+z3>aS`u9DS=!wg8ROu?X4TFoW6CFLL&{GzoVT)ldhLekLM|+j3tIxRd|*5=c{=s&*vfPdBr(Fyj(v@%eQj1Soy7m4^@VRl1~@-PV7y+c!xz$8436WBn$t{=}mEdK#k`aystimGgI{(IBx$!pAwFoE9Y`^t^;> zKAD)C(Dl^s%`?q5$P|fZf8Xymrtu^Pv(7D`rn>Z-w$Ahs!z9!94WNVxrJuXfHAaxg zC6s@|Z1$7R$(!#t%Jb{{s6(Y?NoQXDYq)!}X@jKPhe`{9KQ@sAU8y-5`xt?S9$jKH zoi}6m5PcG*^{kjvt+kwPpyQzVg4o)a>;LK`aaN2x4@itBD3Aq?yWTM20VRn1rrd+2 zKO=P0rMjEGq_UqpMa`~7B|p?xAN1SCoCp}QxAv8O`jLJ5CVh@umR%c%i^)6!o+~`F zaalSTQcl5iwOLC&H)efzd{8(88mo`GI(56T<(&p7>Qd^;R1hn1Y~jN~tApaL8>##U zd65bo8)79CplWxr#z4!6HvLz&N7_5AN#x;kLG?zQ(#p|lj<8VUlKY=Aw!ATqeL-VG z42gA!^cMNPj>(`ZMEbCrnkg*QTsn*u(nQPWI9pA{MQ=IsPTzd7q5E#7+z>Ch=fx$~ z;J|?(5jTo5UWGvsJa(Sx0?S#56+8SD!I^tftyeh_{5_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n3@C*)`o&K9o7V6DwzVMEhjVdDJ1fjhr#@=lp#@4EBqi=CCQ>73>R(>QKPNM&_Jpe5G`n4wegeC`FYEPJ{|vwS>$-`fuRSp3927qOv|NC3T3G-0 zA{K`|+tQy1yqE$ShWt8ny&5~)%ITb@^+x$w0)f&om;P8B)@}=Wzy59BwUfZ1vqw87 za2lB8J(&*l#(V}Id8SyQ0C(2amzkz3EqG&Ed0Jq1)$|&>4_|NIe=5|n=3?siFV0fI z{As5DLW^gs|B-b4C;Hd(SM-S~GQhzb>HgF2|2Usww0nL^;x@1eaB)=+Clj+$fF@H( z-fqP??~QMT$KI-#m;QC*&6vkp&8699G3)Bq0*kFZXINw=b9OVaed(3(3kS|IZ)CM? zJdnW&%t8MveBuK21uiYj)_a{Fnw0OErMzMN?d$QoPwkhOwcP&p+t>P)4tHlYw-pPN z^oJ=uc$Sl>pv@fZH~ZqxSvdhF@F1s=oZawpr^-#l{IIOGG=T%QXjtwPhIg-F@k@uIlr?J->Ia zpEUQ*=4g|XYn4Gez&aHr*;t$u3oODPmc2Ku)2Og|xjc%w;q!Zz+zY)*3{7V8bK4;& zYV82FZ+8?v)`J|G1w4I0fWdKg|2b#iaazCv;|?(W-q}$o&Y}Q5d@BRk^jL7#{kbCK zSgkyu;=DV+or2)AxCBgq-nj5=@n^`%T#V+xBGEkW4lCqrE)LMv#f;AvD__cQ@Eg3`~x| zW+h9mofSXCq5|M)9|ez(#X?-sxB%Go8};sJ?2abp(Y!lyi>k)|{M*Z$c{e1-K4ky` MPgg&ebxsLQ025IeI{*Lx literal 0 HcmV?d00001 diff --git a/widgetbook/web/index.html b/widgetbook/web/index.html new file mode 100644 index 0000000..4ffb957 --- /dev/null +++ b/widgetbook/web/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + widgetbook + + + + + + diff --git a/widgetbook/web/manifest.json b/widgetbook/web/manifest.json new file mode 100644 index 0000000..6bd71b6 --- /dev/null +++ b/widgetbook/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "widgetbook", + "short_name": "widgetbook", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +}