Remove BuildContext argument to initState
This argument isn't needed anymore now that State has a getter for context.
This commit is contained in:
@@ -54,8 +54,8 @@ class MineDiggerState extends State<MineDigger> {
|
||||
// |uiState| keeps track of the visible player progess.
|
||||
List<List<CellState>> uiState;
|
||||
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
resetGame();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ class StocksAppState extends State<StocksApp> {
|
||||
final Map<String, Stock> _stocks = <String, Stock>{};
|
||||
final List<String> _symbols = <String>[];
|
||||
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
new StockDataFetcher((StockData data) {
|
||||
setState(() {
|
||||
data.appendTo(_stocks, _symbols);
|
||||
|
||||
@@ -65,8 +65,8 @@ class CardCollectionAppState extends State<CardCollectionApp> {
|
||||
_initVariableSizedCardModels();
|
||||
}
|
||||
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
_initCardModels();
|
||||
}
|
||||
|
||||
@@ -264,7 +264,6 @@ class CardCollectionAppState extends State<CardCollectionApp> {
|
||||
})
|
||||
.toList();
|
||||
|
||||
double offset;
|
||||
for (int i = 0; i < cumulativeHeights.length; i++) {
|
||||
if (cumulativeHeights[i] >= scrollOffset)
|
||||
return 12.0 + (margins + _cardModels[i].height) / 2.0 + ((i == 0) ? 0.0 : cumulativeHeights[i - 1]);
|
||||
|
||||
@@ -12,8 +12,8 @@ class DatePickerDemo extends StatefulComponent {
|
||||
}
|
||||
|
||||
class DatePickerDemoState extends State<DatePickerDemo> {
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
DateTime now = new DateTime.now();
|
||||
_dateTime = new DateTime(now.year, now.month, now.day);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ class PageableListApp extends StatefulComponent {
|
||||
}
|
||||
|
||||
class PageableListAppState extends State<PageableListApp> {
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
List<Size> cardSizes = [
|
||||
[100.0, 300.0], [300.0, 100.0], [200.0, 400.0], [400.0, 400.0], [300.0, 400.0]
|
||||
]
|
||||
|
||||
@@ -11,8 +11,8 @@ class ProgressIndicatorApp extends StatefulComponent {
|
||||
}
|
||||
|
||||
class ProgressIndicatorAppState extends State<ProgressIndicatorApp> {
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
valueAnimation = new ValueAnimation<double>()
|
||||
..duration = const Duration(milliseconds: 1500)
|
||||
..variable = new AnimatedValue<double>(
|
||||
|
||||
@@ -11,8 +11,8 @@ class ScaleApp extends StatefulComponent {
|
||||
}
|
||||
|
||||
class ScaleAppState extends State<ScaleApp> {
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
_offset = Offset.zero;
|
||||
_zoom = 1.0;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ class StyledTextApp extends StatefulComponent {
|
||||
}
|
||||
|
||||
class StyledTextAppState extends State<StyledTextApp> {
|
||||
void initState(BuildContext context) {
|
||||
super.initState(context);
|
||||
void initState() {
|
||||
super.initState();
|
||||
toText = toStyledText;
|
||||
nameLines = dialogText
|
||||
.split('\n')
|
||||
|
||||
Reference in New Issue
Block a user