@@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [CircularProgressIndicator].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Flutter code sample for [CircularProgressIndicator].
|
||||
|
||||
void main() => runApp(const ProgressIndicatorApp());
|
||||
|
||||
class ProgressIndicatorApp extends StatelessWidget {
|
||||
@@ -26,8 +26,7 @@ class ProgressIndicatorExample extends StatefulWidget {
|
||||
State<ProgressIndicatorExample> createState() => _ProgressIndicatorExampleState();
|
||||
}
|
||||
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample>
|
||||
with TickerProviderStateMixin {
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample> with TickerProviderStateMixin {
|
||||
late AnimationController controller;
|
||||
|
||||
@override
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [CircularProgressIndicator].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Flutter code sample for [CircularProgressIndicator].
|
||||
|
||||
void main() => runApp(const ProgressIndicatorApp());
|
||||
|
||||
class ProgressIndicatorApp extends StatelessWidget {
|
||||
@@ -27,8 +27,7 @@ class ProgressIndicatorExample extends StatefulWidget {
|
||||
State<ProgressIndicatorExample> createState() => _ProgressIndicatorExampleState();
|
||||
}
|
||||
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample>
|
||||
with TickerProviderStateMixin {
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample> with TickerProviderStateMixin {
|
||||
late AnimationController controller;
|
||||
bool determinate = false;
|
||||
|
||||
@@ -86,7 +85,9 @@ class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample>
|
||||
if (determinate) {
|
||||
controller.stop();
|
||||
} else {
|
||||
controller..forward(from: controller.value)..repeat();
|
||||
controller
|
||||
..forward(from: controller.value)
|
||||
..repeat();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [LinearProgressIndicator].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Flutter code sample for [LinearProgressIndicator].
|
||||
|
||||
void main() => runApp(const ProgressIndicatorApp());
|
||||
|
||||
class ProgressIndicatorApp extends StatelessWidget {
|
||||
@@ -26,8 +26,7 @@ class ProgressIndicatorExample extends StatefulWidget {
|
||||
State<ProgressIndicatorExample> createState() => _ProgressIndicatorExampleState();
|
||||
}
|
||||
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample>
|
||||
with TickerProviderStateMixin {
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample> with TickerProviderStateMixin {
|
||||
late AnimationController controller;
|
||||
|
||||
@override
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [LinearProgressIndicator].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Flutter code sample for [LinearProgressIndicator].
|
||||
|
||||
void main() => runApp(const ProgressIndicatorApp());
|
||||
|
||||
class ProgressIndicatorApp extends StatelessWidget {
|
||||
@@ -27,8 +27,7 @@ class ProgressIndicatorExample extends StatefulWidget {
|
||||
State<ProgressIndicatorExample> createState() => _ProgressIndicatorExampleState();
|
||||
}
|
||||
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample>
|
||||
with TickerProviderStateMixin {
|
||||
class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample> with TickerProviderStateMixin {
|
||||
late AnimationController controller;
|
||||
bool determinate = false;
|
||||
|
||||
@@ -86,7 +85,9 @@ class _ProgressIndicatorExampleState extends State<ProgressIndicatorExample>
|
||||
if (determinate) {
|
||||
controller.stop();
|
||||
} else {
|
||||
controller..forward(from: controller.value)..repeat();
|
||||
controller
|
||||
..forward(from: controller.value)
|
||||
..repeat();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user