mirror of
https://github.com/git-touch/git-touch
synced 2025-02-26 08:17:42 +01:00
fix: duplicated class name
This commit is contained in:
parent
bd131b0ef3
commit
af25486a9c
lib
@ -344,13 +344,13 @@ mutation {
|
||||
return ActionButton(
|
||||
title: (isPullRequest ? 'Pull Request' : 'Issue') + ' Actions',
|
||||
actions: [
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Share',
|
||||
onPress: () {
|
||||
Share.share(payload['url']);
|
||||
},
|
||||
),
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Open in Browser',
|
||||
onPress: () {
|
||||
launch(payload['url']);
|
||||
|
@ -74,14 +74,14 @@ class NewsScreenState extends State<NewsScreen> {
|
||||
return ActionButton(
|
||||
title: 'Filter',
|
||||
actions: [
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Show all items',
|
||||
onPress: () {
|
||||
filter = NewsFilter.all;
|
||||
refresh(force: true);
|
||||
},
|
||||
),
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Only GitHub items',
|
||||
onPress: () {
|
||||
filter = NewsFilter.github;
|
||||
|
@ -135,13 +135,13 @@ class _OrganizationScreenState extends State<OrganizationScreen> {
|
||||
title: Text(widget.login),
|
||||
trailingBuilder: (payload) {
|
||||
return ActionButton(title: 'User Actions', actions: [
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Share',
|
||||
onPress: () {
|
||||
Share.share(payload['url']);
|
||||
},
|
||||
),
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Open in Browser',
|
||||
onPress: () {
|
||||
launch(payload['url']);
|
||||
|
@ -94,7 +94,7 @@ class _RepoScreenState extends State<RepoScreen> {
|
||||
var payload = data[0];
|
||||
|
||||
return ActionButton(title: 'Repository Actions', actions: [
|
||||
Action(
|
||||
MyAction(
|
||||
text: '@$owner',
|
||||
onPress: () {
|
||||
WidgetBuilder builder;
|
||||
@ -117,7 +117,7 @@ class _RepoScreenState extends State<RepoScreen> {
|
||||
.pushRoute(context: context, builder: builder);
|
||||
},
|
||||
),
|
||||
Action(
|
||||
MyAction(
|
||||
text: payload['viewerHasStarred'] ? 'Unstar' : 'Star',
|
||||
onPress: () async {
|
||||
if (payload['viewerHasStarred']) {
|
||||
@ -132,13 +132,13 @@ class _RepoScreenState extends State<RepoScreen> {
|
||||
},
|
||||
),
|
||||
// TODO: watch
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Share',
|
||||
onPress: () {
|
||||
Share.share(payload['url']);
|
||||
},
|
||||
),
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Open in Browser',
|
||||
onPress: () {
|
||||
launch(payload['url']);
|
||||
|
@ -163,10 +163,10 @@ class _UserScreenState extends State<UserScreen> {
|
||||
fullscreenDialog: true,
|
||||
);
|
||||
} else {
|
||||
List<Action> actions = [];
|
||||
List<MyAction> actions = [];
|
||||
|
||||
if (payload['viewerCanFollow']) {
|
||||
actions.add(Action(
|
||||
actions.add(MyAction(
|
||||
text: payload['viewerIsFollowing'] ? 'Unfollow' : 'Follow',
|
||||
onPress: () async {
|
||||
if (payload['viewerIsFollowing']) {
|
||||
@ -183,13 +183,13 @@ class _UserScreenState extends State<UserScreen> {
|
||||
}
|
||||
|
||||
actions.addAll([
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Share',
|
||||
onPress: () {
|
||||
Share.share(payload['url']);
|
||||
},
|
||||
),
|
||||
Action(
|
||||
MyAction(
|
||||
text: 'Open in Browser',
|
||||
onPress: () {
|
||||
launch(payload['url']);
|
||||
|
@ -2,16 +2,16 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import '../providers/settings.dart';
|
||||
|
||||
class Action {
|
||||
class MyAction {
|
||||
String text;
|
||||
Function onPress;
|
||||
|
||||
Action({@required this.text, @required this.onPress});
|
||||
MyAction({@required this.text, @required this.onPress});
|
||||
}
|
||||
|
||||
class ActionButton extends StatelessWidget {
|
||||
final String title;
|
||||
final List<Action> actions;
|
||||
final List<MyAction> actions;
|
||||
final IconData iconData;
|
||||
|
||||
ActionButton({
|
||||
|
Loading…
x
Reference in New Issue
Block a user