dart fix --apply --code=prefer_typing_uninitialized_variables

This commit is contained in:
Caleb Jasik 2025-02-13 11:19:14 -06:00
parent b48971f130
commit 7fd9ff5abc
No known key found for this signature in database
3 changed files with 4 additions and 3 deletions

View file

@ -32,7 +32,7 @@ class _SpecialButtonState extends State<SpecialButton> with SingleTickerProvider
}
Widget _buildAndroid() {
var textStyle;
TextStyle? textStyle;
if (widget.useButtonTheme) {
textStyle = Theme.of(context).textTheme.labelLarge;
}

View file

@ -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 {

View file

@ -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);