File tree 6 files changed +27
-27
lines changed
6 files changed +27
-27
lines changed Original file line number Diff line number Diff line change @@ -344,13 +344,13 @@ mutation {
344
344
return ActionButton (
345
345
title: (isPullRequest ? 'Pull Request' : 'Issue' ) + ' Actions' ,
346
346
actions: [
347
- Action (
347
+ MyAction (
348
348
text: 'Share' ,
349
349
onPress: () {
350
350
Share .share (payload['url' ]);
351
351
},
352
352
),
353
- Action (
353
+ MyAction (
354
354
text: 'Open in Browser' ,
355
355
onPress: () {
356
356
launch (payload['url' ]);
Original file line number Diff line number Diff line change @@ -74,14 +74,14 @@ class NewsScreenState extends State<NewsScreen> {
74
74
return ActionButton (
75
75
title: 'Filter' ,
76
76
actions: [
77
- Action (
77
+ MyAction (
78
78
text: 'Show all items' ,
79
79
onPress: () {
80
80
filter = NewsFilter .all;
81
81
refresh (force: true );
82
82
},
83
83
),
84
- Action (
84
+ MyAction (
85
85
text: 'Only GitHub items' ,
86
86
onPress: () {
87
87
filter = NewsFilter .github;
Original file line number Diff line number Diff line change @@ -135,13 +135,13 @@ class _OrganizationScreenState extends State<OrganizationScreen> {
135
135
title: Text (widget.login),
136
136
trailingBuilder: (payload) {
137
137
return ActionButton (title: 'User Actions' , actions: [
138
- Action (
138
+ MyAction (
139
139
text: 'Share' ,
140
140
onPress: () {
141
141
Share .share (payload['url' ]);
142
142
},
143
143
),
144
- Action (
144
+ MyAction (
145
145
text: 'Open in Browser' ,
146
146
onPress: () {
147
147
launch (payload['url' ]);
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class _RepoScreenState extends State<RepoScreen> {
94
94
var payload = data[0 ];
95
95
96
96
return ActionButton (title: 'Repository Actions' , actions: [
97
- Action (
97
+ MyAction (
98
98
text: '@$owner ' ,
99
99
onPress: () {
100
100
WidgetBuilder builder;
@@ -117,7 +117,7 @@ class _RepoScreenState extends State<RepoScreen> {
117
117
.pushRoute (context: context, builder: builder);
118
118
},
119
119
),
120
- Action (
120
+ MyAction (
121
121
text: payload['viewerHasStarred' ] ? 'Unstar' : 'Star' ,
122
122
onPress: () async {
123
123
if (payload['viewerHasStarred' ]) {
@@ -132,13 +132,13 @@ class _RepoScreenState extends State<RepoScreen> {
132
132
},
133
133
),
134
134
// TODO: watch
135
- Action (
135
+ MyAction (
136
136
text: 'Share' ,
137
137
onPress: () {
138
138
Share .share (payload['url' ]);
139
139
},
140
140
),
141
- Action (
141
+ MyAction (
142
142
text: 'Open in Browser' ,
143
143
onPress: () {
144
144
launch (payload['url' ]);
@@ -147,9 +147,9 @@ class _RepoScreenState extends State<RepoScreen> {
147
147
]);
148
148
},
149
149
onRefresh: () => Future .wait ([
150
- queryRepo (context),
151
- fetchReadme (context),
152
- ]),
150
+ queryRepo (context),
151
+ fetchReadme (context),
152
+ ]),
153
153
bodyBuilder: (data) {
154
154
var payload = data[0 ];
155
155
var readme = data[1 ];
@@ -170,18 +170,18 @@ class _RepoScreenState extends State<RepoScreen> {
170
170
count: payload['issues' ]['totalCount' ],
171
171
text: 'Issues' ,
172
172
screenBuilder: (context) => IssuesScreen (
173
- owner: widget.owner,
174
- name: widget.name,
175
- ),
173
+ owner: widget.owner,
174
+ name: widget.name,
175
+ ),
176
176
),
177
177
EntryItem (
178
178
count: payload['pullRequests' ]['totalCount' ],
179
179
text: 'Pull Requests' ,
180
180
screenBuilder: (context) => IssuesScreen (
181
- owner: widget.owner,
182
- name: widget.name,
183
- isPullRequest: true ,
184
- ),
181
+ owner: widget.owner,
182
+ name: widget.name,
183
+ isPullRequest: true ,
184
+ ),
185
185
),
186
186
EntryItem (
187
187
text: 'Files' ,
Original file line number Diff line number Diff line change @@ -163,10 +163,10 @@ class _UserScreenState extends State<UserScreen> {
163
163
fullscreenDialog: true ,
164
164
);
165
165
} else {
166
- List <Action > actions = [];
166
+ List <MyAction > actions = [];
167
167
168
168
if (payload['viewerCanFollow' ]) {
169
- actions.add (Action (
169
+ actions.add (MyAction (
170
170
text: payload['viewerIsFollowing' ] ? 'Unfollow' : 'Follow' ,
171
171
onPress: () async {
172
172
if (payload['viewerIsFollowing' ]) {
@@ -183,13 +183,13 @@ class _UserScreenState extends State<UserScreen> {
183
183
}
184
184
185
185
actions.addAll ([
186
- Action (
186
+ MyAction (
187
187
text: 'Share' ,
188
188
onPress: () {
189
189
Share .share (payload['url' ]);
190
190
},
191
191
),
192
- Action (
192
+ MyAction (
193
193
text: 'Open in Browser' ,
194
194
onPress: () {
195
195
launch (payload['url' ]);
Original file line number Diff line number Diff line change @@ -2,16 +2,16 @@ import 'package:flutter/material.dart';
2
2
import 'package:flutter/cupertino.dart' ;
3
3
import '../providers/settings.dart' ;
4
4
5
- class Action {
5
+ class MyAction {
6
6
String text;
7
7
Function onPress;
8
8
9
- Action ({@required this .text, @required this .onPress});
9
+ MyAction ({@required this .text, @required this .onPress});
10
10
}
11
11
12
12
class ActionButton extends StatelessWidget {
13
13
final String title;
14
- final List <Action > actions;
14
+ final List <MyAction > actions;
15
15
final IconData iconData;
16
16
17
17
ActionButton ({
You can’t perform that action at this time.
0 commit comments