Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • android/org.benoitharrault.scrobbles
1 result
Show changes
Showing
with 26 additions and 76 deletions
import 'package:hydrated_bloc/hydrated_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/config/activity_page.dart'; import 'package:scrobbles/config/activity_page.dart';
......
import 'package:hydrated_bloc/hydrated_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/config/screen.dart'; import 'package:scrobbles/config/screen.dart';
......
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/config/default_global_settings.dart'; import 'package:scrobbles/config/default_global_settings.dart';
......
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
part 'theme_state.dart'; part 'theme_state.dart';
......
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:hive/hive.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:path_provider/path_provider.dart';
import 'package:scrobbles/config/theme.dart';
import 'package:scrobbles/cubit/nav_cubit_pages.dart'; import 'package:scrobbles/cubit/nav_cubit_pages.dart';
import 'package:scrobbles/cubit/nav_cubit_screens.dart'; import 'package:scrobbles/cubit/nav_cubit_screens.dart';
import 'package:scrobbles/cubit/data_counts_by_day_cubit.dart'; import 'package:scrobbles/cubit/data_counts_by_day_cubit.dart';
......
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
class AppHeader extends StatelessWidget {
const AppHeader({super.key, required this.text});
final String text;
@override
Widget build(BuildContext context) {
return Text(
tr(text),
textAlign: TextAlign.start,
style: Theme.of(context).textTheme.headlineMedium!.apply(fontWeightDelta: 2),
);
}
}
class AppTitle extends StatelessWidget {
const AppTitle({super.key, required this.text});
final String text;
@override
Widget build(BuildContext context) {
return Text(
text,
textAlign: TextAlign.start,
style: Theme.of(context).textTheme.titleLarge!.apply(fontWeightDelta: 2),
);
}
}
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:flutter_swipe/flutter_swipe.dart'; import 'package:flutter_swipe/flutter_swipe.dart';
import 'package:scrobbles/config/activity_page.dart'; import 'package:scrobbles/config/activity_page.dart';
...@@ -36,7 +35,7 @@ class BottomNavBar extends StatelessWidget { ...@@ -36,7 +35,7 @@ class BottomNavBar extends StatelessWidget {
return BottomNavigationBar( return BottomNavigationBar(
currentIndex: pageIndex, currentIndex: pageIndex,
onTap: (int index) { onTap: (int index) {
context.read<NavCubitPage>().updateIndex(index); BlocProvider.of<NavCubitPage>(context).updateIndex(index);
swipeController.move(index); swipeController.move(index);
}, },
type: BottomNavigationBarType.fixed, type: BottomNavigationBarType.fixed,
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:unicons/unicons.dart';
import 'package:scrobbles/cubit/data_counts_by_day_cubit.dart'; import 'package:scrobbles/cubit/data_counts_by_day_cubit.dart';
import 'package:scrobbles/cubit/data_counts_by_hour_cubit.dart'; import 'package:scrobbles/cubit/data_counts_by_hour_cubit.dart';
...@@ -15,7 +14,6 @@ import 'package:scrobbles/cubit/data_top_artists_cubit.dart'; ...@@ -15,7 +14,6 @@ import 'package:scrobbles/cubit/data_top_artists_cubit.dart';
import 'package:scrobbles/cubit/nav_cubit_pages.dart'; import 'package:scrobbles/cubit/nav_cubit_pages.dart';
import 'package:scrobbles/config/screen.dart'; import 'package:scrobbles/config/screen.dart';
import 'package:scrobbles/cubit/nav_cubit_screens.dart'; import 'package:scrobbles/cubit/nav_cubit_screens.dart';
import 'package:scrobbles/ui/helpers/app_titles.dart';
class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget {
const GlobalAppBar({super.key}); const GlobalAppBar({super.key});
...@@ -30,7 +28,7 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -30,7 +28,7 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget {
// go to Settings page // go to Settings page
menuActions.add(IconButton( menuActions.add(IconButton(
onPressed: () { onPressed: () {
context.read<NavCubitScreen>().goToSettingsPage(); BlocProvider.of<NavCubitScreen>(context).goToSettingsPage();
}, },
icon: Screen.screenSettings.icon, icon: Screen.screenSettings.icon,
)); ));
...@@ -38,7 +36,7 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -38,7 +36,7 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget {
// go to About page // go to About page
menuActions.add(IconButton( menuActions.add(IconButton(
onPressed: () { onPressed: () {
context.read<NavCubitScreen>().goToAboutPage(); BlocProvider.of<NavCubitScreen>(context).goToAboutPage();
}, },
icon: Screen.screenAbout.icon, icon: Screen.screenAbout.icon,
)); ));
...@@ -63,8 +61,8 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -63,8 +61,8 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget {
// back to Home page // back to Home page
menuActions.add(IconButton( menuActions.add(IconButton(
onPressed: () { onPressed: () {
context.read<NavCubitScreen>().goToActivityPage(); BlocProvider.of<NavCubitScreen>(context).goToActivityPage();
context.read<NavCubitPage>().goToHomePage(); BlocProvider.of<NavCubitPage>(context).goToHomePage();
}, },
icon: Screen.screenActivity.icon, icon: Screen.screenActivity.icon,
)); ));
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/cubit/data_discoveries_cubit.dart'; import 'package:scrobbles/cubit/data_discoveries_cubit.dart';
import 'package:scrobbles/cubit/data_new_artists_cubit.dart'; import 'package:scrobbles/cubit/data_new_artists_cubit.dart';
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/cubit/data_statistics_global_cubit.dart'; import 'package:scrobbles/cubit/data_statistics_global_cubit.dart';
import 'package:scrobbles/cubit/data_statistics_recent_cubit.dart'; import 'package:scrobbles/cubit/data_statistics_recent_cubit.dart';
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/cubit/data_counts_by_day_cubit.dart'; import 'package:scrobbles/cubit/data_counts_by_day_cubit.dart';
import 'package:scrobbles/cubit/data_counts_by_hour_cubit.dart'; import 'package:scrobbles/cubit/data_counts_by_hour_cubit.dart';
......
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/ui/helpers/app_titles.dart';
class ScreenAbout extends StatelessWidget { class ScreenAbout extends StatelessWidget {
const ScreenAbout({super.key}); const ScreenAbout({super.key});
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:flutter_swipe/flutter_swipe.dart'; import 'package:flutter_swipe/flutter_swipe.dart';
import 'package:scrobbles/config/activity_page.dart'; import 'package:scrobbles/config/activity_page.dart';
......
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/ui/helpers/app_titles.dart';
import 'package:scrobbles/ui/settings/settings_form.dart'; import 'package:scrobbles/ui/settings/settings_form.dart';
class ScreenSettings extends StatelessWidget { class ScreenSettings extends StatelessWidget {
......
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/ui/settings/theme_card.dart';
import 'package:unicons/unicons.dart';
import 'package:scrobbles/config/default_global_settings.dart'; import 'package:scrobbles/config/default_global_settings.dart';
import 'package:scrobbles/cubit/settings_global_cubit.dart'; import 'package:scrobbles/cubit/settings_global_cubit.dart';
import 'package:scrobbles/ui/helpers/app_titles.dart'; import 'package:scrobbles/ui/settings/theme_card.dart';
class SettingsForm extends StatefulWidget { class SettingsForm extends StatefulWidget {
const SettingsForm({super.key}); const SettingsForm({super.key});
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/cubit/theme_cubit.dart'; import 'package:scrobbles/cubit/theme_cubit.dart';
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/config/screen.dart'; import 'package:scrobbles/config/screen.dart';
import 'package:scrobbles/cubit/nav_cubit_screens.dart'; import 'package:scrobbles/cubit/nav_cubit_screens.dart';
......
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:scrobbles/ui/widgets/abstracts/custom_chart.dart'; import 'package:scrobbles/ui/widgets/abstracts/custom_chart.dart';
import 'package:scrobbles/utils/color_extensions.dart';
class CustomBarChart extends CustomChart { class CustomBarChart extends CustomChart {
const CustomBarChart({ const CustomBarChart({
......
import 'package:easy_localization/easy_localization.dart';
import 'package:fl_chart/fl_chart.dart'; import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/config/app_colors.dart'; import 'package:scrobbles/config/app_colors.dart';
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:scrobbles/ui/helpers/app_titles.dart';
class CardContent extends StatelessWidget { class CardContent extends StatelessWidget {
const CardContent({ const CardContent({
......