Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07a102c

Browse files
Add loading example
1 parent 7190bff commit 07a102c

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

‎lib/pages/loading.dart

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:loading_indicator/loading_indicator.dart';
3+
4+
class LoadingExample extends StatefulWidget {
5+
const LoadingExample({ Key? key }) : super(key: key);
6+
7+
@override
8+
_LoadingExampleState createState() => _LoadingExampleState();
9+
}
10+
11+
class _LoadingExampleState extends State<LoadingExample> {
12+
13+
@override
14+
Widget build(BuildContext context) {
15+
return Scaffold(
16+
body: SafeArea(
17+
child: Container(
18+
padding: EdgeInsets.symmetric(vertical: 50),
19+
width: double.infinity,
20+
child: Column(
21+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
22+
crossAxisAlignment: CrossAxisAlignment.center,
23+
children: [
24+
Container(
25+
width: 100,
26+
child: LoadingIndicator(
27+
indicatorType: Indicator.ballScaleMultiple,
28+
colors: [Colors.red, Colors.green, Colors.blue, Colors.orange, Colors.deepPurple],
29+
strokeWidth: 2,
30+
),
31+
),
32+
Container(
33+
width: 100,
34+
child: LoadingIndicator(
35+
indicatorType: Indicator.ballSpinFadeLoader,
36+
colors: [Colors.red, Colors.green, Colors.blue, Colors.orange, Colors.deepPurple],
37+
strokeWidth: 2,
38+
),
39+
),
40+
Container(
41+
width: 100,
42+
child: LoadingIndicator(
43+
indicatorType: Indicator.pacman,
44+
colors: [Colors.red, Colors.green, Colors.blue, Colors.orange, Colors.deepPurple],
45+
strokeWidth: 2,
46+
),
47+
),
48+
Container(
49+
width: 100,
50+
child: LoadingIndicator(
51+
indicatorType: Indicator.lineScale,
52+
colors: [Colors.red, Colors.green, Colors.blue, Colors.orange, Colors.deepPurple],
53+
strokeWidth: 2,
54+
),
55+
),
56+
Container(
57+
width: 100,
58+
child: LoadingIndicator(
59+
indicatorType: Indicator.ballClipRotateMultiple,
60+
colors: [Colors.red, Colors.green, Colors.blue, Colors.orange, Colors.deepPurple],
61+
strokeWidth: 2,
62+
),
63+
),
64+
Container(
65+
width: 100,
66+
child: LoadingIndicator(
67+
indicatorType: Indicator.ballRotate,
68+
colors: [Colors.red, Colors.green, Colors.blue, Colors.orange, Colors.deepPurple],
69+
strokeWidth: 2,
70+
),
71+
),
72+
],
73+
),
74+
),
75+
),
76+
);
77+
}
78+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /