diff options
Diffstat (limited to 'lib/presentation/common_widget')
-rw-r--r-- | lib/presentation/common_widget/generic_button.dart | 6 | ||||
-rw-r--r-- | lib/presentation/common_widget/volume_bar.dart | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/presentation/common_widget/generic_button.dart b/lib/presentation/common_widget/generic_button.dart index cca354f..e418cd5 100644 --- a/lib/presentation/common_widget/generic_button.dart +++ b/lib/presentation/common_widget/generic_button.dart @@ -1,14 +1,14 @@ import 'package:flutter_ics_homescreen/export.dart'; class GenericButton extends StatefulWidget { - final double heigth; + final double height; final double width; final String text; final Function onTap; const GenericButton({ super.key, - required this.heigth, + required this.height, required this.width, required this.text, required this.onTap, @@ -57,7 +57,7 @@ class _GenericButtonState extends State<GenericButton> { widget.onTap(); }, child: Container( - height: widget.heigth, + height: widget.height, width: widget.width, decoration: BoxDecoration( gradient: Gradient.lerp(gradientEnable1, gradientEnable2, 0.5), diff --git a/lib/presentation/common_widget/volume_bar.dart b/lib/presentation/common_widget/volume_bar.dart index f494332..b54283e 100644 --- a/lib/presentation/common_widget/volume_bar.dart +++ b/lib/presentation/common_widget/volume_bar.dart @@ -22,7 +22,7 @@ class VolumeBarState extends ConsumerState<VolumeBar> { val = 100; } setState(() { - ref.read(vehicleProvider.notifier).setVolume(val); + ref.read(audioStateProvider.notifier).setVolume(val); }); } @@ -32,14 +32,14 @@ class VolumeBarState extends ConsumerState<VolumeBar> { val = 0; } setState(() { - ref.read(vehicleProvider.notifier).setVolume(val); + ref.read(audioStateProvider.notifier).setVolume(val); }); } void setVolume(double newWalue) { setState(() { val = newWalue; - ref.read(vehicleProvider.notifier).setVolume(val); + ref.read(audioStateProvider.notifier).setVolume(val); }); } @@ -48,7 +48,7 @@ class VolumeBarState extends ConsumerState<VolumeBar> { @override Widget build(BuildContext context) { final volumeValue = - ref.watch(vehicleProvider.select((vehicle) => vehicle.mediaVolume)); + ref.watch(audioStateProvider.select((audio) => audio.volume)); val = volumeValue.toDouble(); return Column( // mainAxisAlignment: MainAxisAlignment.center, |