-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprogress_page.dart
54 lines (52 loc) · 1.6 KB
/
progress_page.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import 'package:example/helpers.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:platty/platty.dart';
class ProgressPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return PScaffold(
backgroundColor: Colors.white,
appBar: navBarFor(title: "Progress Widgets"),
child: Container(
child: Column(
children: <Widget>[
_buildProgressItem(
title: "Platform Activity",
activityBuilder: () => PActivityIndicator(
androidValueColor: AlwaysStoppedAnimation(Colors.red),
),
),
_buildProgressItem(
title: "iOS Activity",
activityBuilder: () => PActivityIndicator(
renderPlatform: TargetPlatform.iOS,
),
),
_buildProgressItem(
title: "Android Activity",
activityBuilder: () => PActivityIndicator(
renderPlatform: TargetPlatform.android,
androidValueColor: AlwaysStoppedAnimation(Colors.red),
))
],
),
),
);
}
_buildProgressItem(
{@required String title,
@required Widget Function() activityBuilder}) =>
Padding(
padding: EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
Padding(
padding: EdgeInsets.all(8.0),
child: Text(title),
),
activityBuilder(),
],
),
);
}