Skip to content

Commit af25486

Browse files
committed
fix: duplicated class name
1 parent bd131b0 commit af25486

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

lib/screens/issue.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,13 @@ mutation {
344344
return ActionButton(
345345
title: (isPullRequest ? 'Pull Request' : 'Issue') + ' Actions',
346346
actions: [
347-
Action(
347+
MyAction(
348348
text: 'Share',
349349
onPress: () {
350350
Share.share(payload['url']);
351351
},
352352
),
353-
Action(
353+
MyAction(
354354
text: 'Open in Browser',
355355
onPress: () {
356356
launch(payload['url']);

lib/screens/news.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ class NewsScreenState extends State<NewsScreen> {
7474
return ActionButton(
7575
title: 'Filter',
7676
actions: [
77-
Action(
77+
MyAction(
7878
text: 'Show all items',
7979
onPress: () {
8080
filter = NewsFilter.all;
8181
refresh(force: true);
8282
},
8383
),
84-
Action(
84+
MyAction(
8585
text: 'Only GitHub items',
8686
onPress: () {
8787
filter = NewsFilter.github;

lib/screens/organization.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ class _OrganizationScreenState extends State<OrganizationScreen> {
135135
title: Text(widget.login),
136136
trailingBuilder: (payload) {
137137
return ActionButton(title: 'User Actions', actions: [
138-
Action(
138+
MyAction(
139139
text: 'Share',
140140
onPress: () {
141141
Share.share(payload['url']);
142142
},
143143
),
144-
Action(
144+
MyAction(
145145
text: 'Open in Browser',
146146
onPress: () {
147147
launch(payload['url']);

lib/screens/repo.dart

+14-14
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class _RepoScreenState extends State<RepoScreen> {
9494
var payload = data[0];
9595

9696
return ActionButton(title: 'Repository Actions', actions: [
97-
Action(
97+
MyAction(
9898
text: '@$owner',
9999
onPress: () {
100100
WidgetBuilder builder;
@@ -117,7 +117,7 @@ class _RepoScreenState extends State<RepoScreen> {
117117
.pushRoute(context: context, builder: builder);
118118
},
119119
),
120-
Action(
120+
MyAction(
121121
text: payload['viewerHasStarred'] ? 'Unstar' : 'Star',
122122
onPress: () async {
123123
if (payload['viewerHasStarred']) {
@@ -132,13 +132,13 @@ class _RepoScreenState extends State<RepoScreen> {
132132
},
133133
),
134134
// TODO: watch
135-
Action(
135+
MyAction(
136136
text: 'Share',
137137
onPress: () {
138138
Share.share(payload['url']);
139139
},
140140
),
141-
Action(
141+
MyAction(
142142
text: 'Open in Browser',
143143
onPress: () {
144144
launch(payload['url']);
@@ -147,9 +147,9 @@ class _RepoScreenState extends State<RepoScreen> {
147147
]);
148148
},
149149
onRefresh: () => Future.wait([
150-
queryRepo(context),
151-
fetchReadme(context),
152-
]),
150+
queryRepo(context),
151+
fetchReadme(context),
152+
]),
153153
bodyBuilder: (data) {
154154
var payload = data[0];
155155
var readme = data[1];
@@ -170,18 +170,18 @@ class _RepoScreenState extends State<RepoScreen> {
170170
count: payload['issues']['totalCount'],
171171
text: 'Issues',
172172
screenBuilder: (context) => IssuesScreen(
173-
owner: widget.owner,
174-
name: widget.name,
175-
),
173+
owner: widget.owner,
174+
name: widget.name,
175+
),
176176
),
177177
EntryItem(
178178
count: payload['pullRequests']['totalCount'],
179179
text: 'Pull Requests',
180180
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+
),
185185
),
186186
EntryItem(
187187
text: 'Files',

lib/screens/user.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ class _UserScreenState extends State<UserScreen> {
163163
fullscreenDialog: true,
164164
);
165165
} else {
166-
List<Action> actions = [];
166+
List<MyAction> actions = [];
167167

168168
if (payload['viewerCanFollow']) {
169-
actions.add(Action(
169+
actions.add(MyAction(
170170
text: payload['viewerIsFollowing'] ? 'Unfollow' : 'Follow',
171171
onPress: () async {
172172
if (payload['viewerIsFollowing']) {
@@ -183,13 +183,13 @@ class _UserScreenState extends State<UserScreen> {
183183
}
184184

185185
actions.addAll([
186-
Action(
186+
MyAction(
187187
text: 'Share',
188188
onPress: () {
189189
Share.share(payload['url']);
190190
},
191191
),
192-
Action(
192+
MyAction(
193193
text: 'Open in Browser',
194194
onPress: () {
195195
launch(payload['url']);

lib/widgets/action.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import 'package:flutter/material.dart';
22
import 'package:flutter/cupertino.dart';
33
import '../providers/settings.dart';
44

5-
class Action {
5+
class MyAction {
66
String text;
77
Function onPress;
88

9-
Action({@required this.text, @required this.onPress});
9+
MyAction({@required this.text, @required this.onPress});
1010
}
1111

1212
class ActionButton extends StatelessWidget {
1313
final String title;
14-
final List<Action> actions;
14+
final List<MyAction> actions;
1515
final IconData iconData;
1616

1717
ActionButton({

0 commit comments

Comments
 (0)