diff --git a/lib/intent/qrcode/page/scanner.dart b/lib/intent/qrcode/page/scanner.dart index 6a3b11aa..fdfd4b66 100644 --- a/lib/intent/qrcode/page/scanner.dart +++ b/lib/intent/qrcode/page/scanner.dart @@ -4,7 +4,6 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:go_router/go_router.dart'; import 'package:image_picker/image_picker.dart'; import 'package:path/path.dart' as p; @@ -146,6 +145,7 @@ class _ScannerPageState extends State with WidgetsBindingObserver { buildSwitchButton(), if (UniversalPlatform.isAndroid || UniversalPlatform.isIOS) buildScanImageButton(), ], + persistentFooterAlignment: AlignmentDirectional.center, ); } @@ -157,14 +157,14 @@ class _ScannerPageState extends State with WidgetsBindingObserver { } Widget buildScanImageButton() { - return PlatformIconButton( + return IconButton.filledTonal( icon: const Icon(Icons.image), onPressed: recognizeFromFile, ); } Widget buildSwitchButton() { - return PlatformIconButton( + return IconButton.filledTonal( icon: Icon(context.icons.switchCamera), onPressed: () => controller.switchCamera(), ); @@ -173,18 +173,19 @@ class _ScannerPageState extends State with WidgetsBindingObserver { Widget buildTorchButton() { return controller >> (context, state) => switch (state.torchState) { - TorchState.off => PlatformIconButton( + TorchState.off => IconButton.filledTonal( icon: const Icon(Icons.flash_off), onPressed: controller.toggleTorch, ), - TorchState.on => PlatformIconButton( + TorchState.on => IconButton.filledTonal( icon: const Icon(Icons.flash_on, color: Colors.yellow), onPressed: controller.toggleTorch, ), - TorchState.unavailable => PlatformIconButton( - icon: const Icon(Icons.flash_off), + TorchState.unavailable => const IconButton.filledTonal( + icon: Icon(Icons.flash_off), + onPressed: null, ), - TorchState.auto => PlatformIconButton( + TorchState.auto => IconButton.filledTonal( icon: const Icon(Icons.flash_on), onPressed: controller.toggleTorch, ), diff --git a/lib/timetable/p13n/page/palette.dart b/lib/timetable/p13n/page/palette.dart index e3087c0b..8415ced9 100644 --- a/lib/timetable/p13n/page/palette.dart +++ b/lib/timetable/p13n/page/palette.dart @@ -84,7 +84,7 @@ class _TimetableP13nPageState extends ConsumerState wi FilledButton.tonalIcon( onPressed: generateFromImage, icon: const Icon(Icons.generating_tokens_outlined), - label:i18n.p13n.palette.generate.text(), + label: i18n.p13n.palette.generate.text(), ), FilledButton.icon( onPressed: addPalette,