Skip to content

Commit

Permalink
Fix analysis warnings in example project
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidDWiser committed Sep 2, 2024
1 parent db0b284 commit 5163660
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions packages/widget_toolkit/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ class _MyHomePageState extends State<MyHomePage> {

//# region Showcase Pages
class CommonComponentsPage extends StatelessWidget {
const CommonComponentsPage({required this.pageController, Key? key})
: super(key: key);
const CommonComponentsPage({required this.pageController, super.key});

final PageController pageController;

Expand Down Expand Up @@ -274,7 +273,7 @@ class CommonComponentsPage extends StatelessWidget {
}

class PickersPage extends StatelessWidget {
const PickersPage({required this.pageController, Key? key}) : super(key: key);
const PickersPage({required this.pageController, super.key});

final PageController pageController;

Expand Down Expand Up @@ -347,8 +346,7 @@ class PickersPage extends StatelessWidget {
}

class EditFieldsPage extends StatelessWidget {
const EditFieldsPage({required this.pageController, Key? key})
: super(key: key);
const EditFieldsPage({required this.pageController, super.key});

final PageController pageController;

Expand Down Expand Up @@ -446,8 +444,7 @@ class WidgetSection extends StatelessWidget {
}

class LoadingStateSwitcher extends StatefulWidget {
const LoadingStateSwitcher({required this.builder, Key? key})
: super(key: key);
const LoadingStateSwitcher({required this.builder, super.key});

final Widget Function(bool isDataLoading, void Function(bool value)) builder;

Expand Down Expand Up @@ -487,8 +484,8 @@ class UpdateStateOnSelection<T> extends StatefulWidget {
const UpdateStateOnSelection({
required this.builder,
this.getString,
Key? key,
}) : super(key: key);
super.key,
});

final Widget Function(
List<T> data, void Function(List<T> newData) updateState) builder;
Expand Down Expand Up @@ -533,14 +530,12 @@ class _UpdateStateOnSelectionState<T> extends State<UpdateStateOnSelection<T>> {
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
...localData
.map(
(e) => Text(
'${widget.getString?.call(e) ?? e.toString()} ',
style: const TextStyle(fontSize: 10),
),
)
.toList(),
...localData.map(
(e) => Text(
'${widget.getString?.call(e) ?? e.toString()} ',
style: const TextStyle(fontSize: 10),
),
),
],
),
),
Expand Down

0 comments on commit 5163660

Please sign in to comment.