more const immutable classes (#104988)

* more const immutable classes

* more const constructors in dev/ and examples/
This commit is contained in:
Alexandre Ardhuin
2022-05-31 21:56:24 +02:00
committed by GitHub
parent 16b7348155
commit 552c50e67c
22 changed files with 94 additions and 41 deletions

View File

@@ -214,7 +214,7 @@ class _CustomValueIndicatorShape extends SliderComponentShape {
class _SliderDemoState extends State<SliderDemo> {
@override
Widget build(BuildContext context) {
final List<ComponentDemoTabData> demos = <ComponentDemoTabData>[
const List<ComponentDemoTabData> demos = <ComponentDemoTabData>[
ComponentDemoTabData(
tabName: 'SINGLE',
description: 'Sliders containing 1 thumb',
@@ -229,7 +229,7 @@ class _SliderDemoState extends State<SliderDemo> {
),
];
return TabbedComponentDemoScaffold(
return const TabbedComponentDemoScaffold(
title: 'Sliders',
demos: demos,
isScrollable: false,
@@ -239,6 +239,8 @@ class _SliderDemoState extends State<SliderDemo> {
}
class _Sliders extends StatefulWidget {
const _Sliders();
@override
_SlidersState createState() => _SlidersState();
}
@@ -357,6 +359,8 @@ class _SlidersState extends State<_Sliders> {
}
class _RangeSliders extends StatefulWidget {
const _RangeSliders();
@override
_RangeSlidersState createState() => _RangeSlidersState();
}