diff --git a/lib/components/SpecialButton.dart b/lib/components/SpecialButton.dart index e645de4..a337a56 100644 --- a/lib/components/SpecialButton.dart +++ b/lib/components/SpecialButton.dart @@ -32,7 +32,7 @@ class _SpecialButtonState extends State with SingleTickerProvider } Widget _buildAndroid() { - var textStyle; + TextStyle? textStyle; if (widget.useButtonTheme) { textStyle = Theme.of(context).textTheme.labelLarge; } diff --git a/lib/components/config/ConfigItem.dart b/lib/components/config/ConfigItem.dart index 5cae26e..0956fff 100644 --- a/lib/components/config/ConfigItem.dart +++ b/lib/components/config/ConfigItem.dart @@ -20,7 +20,7 @@ class ConfigItem extends StatelessWidget { @override Widget build(BuildContext context) { - var textStyle; + TextStyle textStyle; if (Platform.isAndroid) { textStyle = Theme.of(context).textTheme.labelLarge!.copyWith(fontWeight: FontWeight.normal); } else { diff --git a/lib/components/config/ConfigPageItem.dart b/lib/components/config/ConfigPageItem.dart index 71d599a..32906a5 100644 --- a/lib/components/config/ConfigPageItem.dart +++ b/lib/components/config/ConfigPageItem.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import 'package:mobile_nebula/components/SpecialButton.dart'; import 'package:mobile_nebula/services/utils.dart'; @@ -25,7 +26,7 @@ class ConfigPageItem extends StatelessWidget { @override Widget build(BuildContext context) { - var theme; + dynamic theme; if (Platform.isAndroid) { final origTheme = Theme.of(context);