fix: build errors and missing dependencies

This commit is contained in:
Dr.Blank 2025-05-22 06:43:46 +05:30
parent cc9a94de62
commit 2e3f4ad8d4
No known key found for this signature in database
GPG key ID: BA5F87FF0560C57B
5 changed files with 283 additions and 349 deletions

View file

@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:settings_ui/settings_ui.dart';
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
import 'package:vaani/settings/app_settings_provider.dart';
import 'package:vaani/settings/widgets/simple_settings_page.dart';
import 'package:vaani/settings/view/simple_settings_page.dart'
show SimpleSettingsPage;
class HomePageSettingsPage extends HookConsumerWidget {
const HomePageSettingsPage({super.key});
@ -13,41 +14,41 @@ class HomePageSettingsPage extends HookConsumerWidget {
final appSettingsNotifier = ref.read(appSettingsProvider.notifier);
return SimpleSettingsPage(
title: 'Home Page Settings',
child: SettingsList(
sections: [
SettingsSection(
tiles: [
SettingsTile.switchTile(
title: const Text('Show play button on continue shelves'),
initialValue: appSettings.homePageSettings.showPlayButtonOnContinueShelves,
onToggle: (value) {
appSettingsNotifier.update(
appSettings.copyWith(
homePageSettings: appSettings.homePageSettings.copyWith(
showPlayButtonOnContinueShelves: value,
),
title: Text('Home Page Settings'),
sections: [
SettingsSection(
tiles: [
SettingsTile.switchTile(
title: const Text('Show play button on continue shelves'),
initialValue:
appSettings.homePageSettings.showPlayButtonOnContinueShelves,
onToggle: (value) {
appSettingsNotifier.update(
appSettings.copyWith(
homePageSettings: appSettings.homePageSettings.copyWith(
showPlayButtonOnContinueShelves: value,
),
);
},
),
SettingsTile.switchTile(
title: const Text('Show play button on all shelves'),
initialValue: appSettings.homePageSettings.showPlayButtonOnAllShelves,
onToggle: (value) {
appSettingsNotifier.update(
appSettings.copyWith(
homePageSettings: appSettings.homePageSettings.copyWith(
showPlayButtonOnAllShelves: value,
),
),
);
},
),
SettingsTile.switchTile(
title: const Text('Show play button on all shelves'),
initialValue:
appSettings.homePageSettings.showPlayButtonOnAllShelves,
onToggle: (value) {
appSettingsNotifier.update(
appSettings.copyWith(
homePageSettings: appSettings.homePageSettings.copyWith(
showPlayButtonOnAllShelves: value,
),
);
},
),
],
),
],
),
),
);
},
),
],
),
],
);
}
}