main.dart
import 'package:flutter/material.dart';
void main() => runApp(const FlutterExample());
class FlutterExample extends StatelessWidget {
const FlutterExample({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Example',
theme: ThemeData(primarySwatch: Colors.indigo),
home: const StateExample()
);
}
}
class StateExample extends StatefulWidget {
const StateExample({Key? key}) : super(key: key);
@override
_StateExampleState createState() => _StateExampleState();
}
class _StateExampleState extends State<StateExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFEDEAE0),
appBar: AppBar(
title: const Text("LinearProgressIndicator Value Color")
),
body: bodyContent(),
);
}
bodyContent() {
return const Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 50),
child:LinearProgressIndicator(
value: null,
valueColor: AlwaysStoppedAnimation<Color>(Colors.pink),
),
)
);
}
}
More flutter tutorials
- flutter – Container shape
- flutter – Container shape circle
- flutter – Container background image
- flutter – Container transform
- flutter – How to remove underline from DropdownButton
- flutter – How to change DropdownButton width
- flutter – InkWell rounded
- flutter – Stack center
- flutter – Stack fit
- flutter – LinearProgressIndicator example
- flutter – Indeterminate LinearProgressIndicator
- flutter – LinearProgressIndicator rounded
- flutter – CircularProgressIndicator size
- flutter – CircularProgressIndicator color
- flutter – CircularProgressIndicator value