refactor: push method as extension
This commit is contained in:
parent
988cdbfe45
commit
cf6871ce20
|
@ -62,7 +62,7 @@ class _HomeState extends State<Home> {
|
|||
// go to app store
|
||||
LaunchReview.launch(writeReview: false);
|
||||
} else {
|
||||
context.read<ThemeModel>().push(context, latest.htmlUrl!);
|
||||
context.pushUrl(latest.htmlUrl!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import 'package:flutter/services.dart';
|
|||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/action_button.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:primer/primer.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
|
@ -36,7 +35,6 @@ class PickerItem<T> {
|
|||
}
|
||||
|
||||
class PickerGroupItem<T> {
|
||||
|
||||
PickerGroupItem({
|
||||
required this.value,
|
||||
required this.items,
|
||||
|
@ -75,7 +73,6 @@ class StaticRoute extends PageRouteBuilder {
|
|||
}
|
||||
|
||||
class Palette {
|
||||
|
||||
const Palette({
|
||||
required this.primary,
|
||||
required this.text,
|
||||
|
@ -219,19 +216,6 @@ class ThemeModel with ChangeNotifier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
push(BuildContext context, String url, {bool replace = false}) {
|
||||
// Fimber.d(url);
|
||||
if (url.startsWith('/')) {
|
||||
if (replace) {
|
||||
context.replace(url);
|
||||
} else {
|
||||
context.push(url);
|
||||
}
|
||||
} else {
|
||||
launchStringUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool?> showConfirm(BuildContext context, Widget content) {
|
||||
return showCupertinoDialog(
|
||||
context: context,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbIssueCommentScreen extends StatefulWidget {
|
||||
const BbIssueCommentScreen(this.owner, this.name, this.number);
|
||||
|
@ -51,8 +51,7 @@ class _BbIssueCommentScreenState extends State<BbIssueCommentScreen> {
|
|||
},
|
||||
);
|
||||
Navigator.pop(context, true);
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/bitbucket/${widget.owner}/${widget.name}/issues/${widget.number}',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbIssueFormScreen extends StatefulWidget {
|
||||
const BbIssueFormScreen(this.owner, this.name);
|
||||
|
@ -64,8 +64,7 @@ class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
|||
return BbIssues.fromJson(v);
|
||||
});
|
||||
Navigator.pop(context, true);
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/bitbucket/${widget.owner}/${widget.name}/issues',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -106,8 +106,8 @@ class BbRepoScreen extends StatelessWidget {
|
|||
.toList(),
|
||||
onClose: (ref) {
|
||||
if (ref != branch) {
|
||||
theme.push(
|
||||
context, '/bitbucket/$owner/$name?branch=$ref',
|
||||
context.pushUrl(
|
||||
'/bitbucket/$owner/$name?branch=$ref',
|
||||
replace: true);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -14,7 +14,6 @@ import 'package:provider/provider.dart';
|
|||
import 'package:tuple/tuple.dart';
|
||||
|
||||
class GeIssueScreen extends StatelessWidget {
|
||||
|
||||
const GeIssueScreen(this.owner, this.name, this.number, {this.isPr = false});
|
||||
final String owner;
|
||||
final String name;
|
||||
|
@ -36,7 +35,7 @@ class GeIssueScreen extends StatelessWidget {
|
|||
'id': comment.id.toString(),
|
||||
},
|
||||
).toString();
|
||||
theme.push(context, uri);
|
||||
context.pushUrl(uri);
|
||||
},
|
||||
),
|
||||
ActionItem(
|
||||
|
@ -45,7 +44,7 @@ class GeIssueScreen extends StatelessWidget {
|
|||
await auth.fetchGitee(
|
||||
'/repos/$owner/$name/issues/comments/${comment.id}',
|
||||
requestType: 'DELETE');
|
||||
await theme.push(context, '/gitee/$owner/$name/issues/$number',
|
||||
await context.pushUrl('/gitee/$owner/$name/issues/$number',
|
||||
replace: true);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class GeIssueCommentScreen extends StatefulWidget {
|
||||
const GeIssueCommentScreen(this.owner, this.name, this.number,
|
||||
|
@ -67,8 +67,7 @@ class _GeIssueCommentScreenState extends State<GeIssueCommentScreen> {
|
|||
);
|
||||
}
|
||||
Navigator.pop(context, '');
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/gitee/${widget.owner}/${widget.name}/${widget.isPr ? 'pulls' : 'issues'}/${widget.number}',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/gitee.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class GeIssueFormScreen extends StatefulWidget {
|
||||
const GeIssueFormScreen(this.owner, this.name);
|
||||
|
@ -63,8 +63,7 @@ class _GeIssueFormScreenState extends State<GeIssueFormScreen> {
|
|||
).then((v) {
|
||||
return GiteeIssue.fromJson(v);
|
||||
});
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/gitee/${widget.owner}/${widget.name}/issues/${res.number}',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -14,7 +14,6 @@ import 'package:provider/provider.dart';
|
|||
import 'package:tuple/tuple.dart';
|
||||
|
||||
class GePullScreen extends StatelessWidget {
|
||||
|
||||
const GePullScreen(this.owner, this.name, this.number, {this.isPr = false});
|
||||
final String owner;
|
||||
final String name;
|
||||
|
@ -36,7 +35,7 @@ class GePullScreen extends StatelessWidget {
|
|||
'id': comment.id.toString(),
|
||||
},
|
||||
).toString();
|
||||
theme.push(context, uri);
|
||||
context.pushUrl(uri);
|
||||
},
|
||||
),
|
||||
ActionItem(
|
||||
|
@ -45,7 +44,7 @@ class GePullScreen extends StatelessWidget {
|
|||
await auth.fetchGitee(
|
||||
'/repos/$owner/$name/pulls/comments/${comment.id}',
|
||||
requestType: 'DELETE');
|
||||
await theme.push(context, '/gitee/$owner/$name/pulls/$number',
|
||||
await context.pushUrl('/gitee/$owner/$name/pulls/$number',
|
||||
replace: true);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -184,8 +184,7 @@ class GeRepoScreen extends StatelessWidget {
|
|||
.toList(),
|
||||
onClose: (ref) {
|
||||
if (ref != branch) {
|
||||
theme.push(
|
||||
context, '/gitee/$owner/$name?branch=$ref',
|
||||
context.pushUrl('/gitee/$owner/$name?branch=$ref',
|
||||
replace: true);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:github/github.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class GhIssueFormScreen extends StatefulWidget {
|
||||
const GhIssueFormScreen(this.owner, this.name);
|
||||
|
@ -62,8 +62,7 @@ class _GhIssueFormScreenState extends State<GhIssueFormScreen> {
|
|||
.ghClient
|
||||
.issues
|
||||
.create(slug, IssueRequest(title: _title, body: _body));
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/github/${widget.owner}/${widget.name}/issues/${res.number}',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -300,8 +300,7 @@ class GhRepoScreen extends StatelessWidget {
|
|||
.toList(),
|
||||
onClose: (ref) {
|
||||
if (ref != branch) {
|
||||
theme.push(
|
||||
context, '/github/$owner/$name?ref=$ref',
|
||||
context.pushUrl('/github/$owner/$name?ref=$ref',
|
||||
replace: true);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/gitlab.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class GlIssueFormScreen extends StatefulWidget {
|
||||
const GlIssueFormScreen(this.id);
|
||||
|
@ -62,8 +62,7 @@ class _GlIssueFormScreenState extends State<GlIssueFormScreen> {
|
|||
).then((v) {
|
||||
return GitlabIssue.fromJson(v);
|
||||
});
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/gitlab/projects/${widget.id}/issues/${res.iid}',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -227,8 +227,7 @@ class GlProjectScreen extends StatelessWidget {
|
|||
.toList(),
|
||||
onClose: (ref) {
|
||||
if (ref != branch) {
|
||||
theme.push(
|
||||
context, '/gitlab/projects/$id?branch=$ref',
|
||||
context.pushUrl('/gitlab/projects/$id?branch=$ref',
|
||||
replace: true);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -135,8 +135,7 @@ class GoRepoScreen extends StatelessWidget {
|
|||
.toList(),
|
||||
onClose: (ref) {
|
||||
if (ref != branch) {
|
||||
theme.push(
|
||||
context, '/gogs/$owner/$name?branch=$ref',
|
||||
context.pushUrl('/gogs/$owner/$name?branch=$ref',
|
||||
replace: true);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -14,7 +14,6 @@ import 'package:provider/provider.dart';
|
|||
import 'package:tuple/tuple.dart';
|
||||
|
||||
class GtIssueScreen extends StatelessWidget {
|
||||
|
||||
const GtIssueScreen(this.owner, this.name, this.number, {this.isPr = false});
|
||||
final String owner;
|
||||
final String name;
|
||||
|
@ -36,7 +35,7 @@ class GtIssueScreen extends StatelessWidget {
|
|||
'id': comment.id.toString(),
|
||||
},
|
||||
).toString();
|
||||
theme.push(context, uri);
|
||||
context.pushUrl(uri);
|
||||
},
|
||||
),
|
||||
ActionItem(
|
||||
|
@ -45,7 +44,7 @@ class GtIssueScreen extends StatelessWidget {
|
|||
await auth.fetchGitea(
|
||||
'/repos/$owner/$name/issues/comments/${comment.id}',
|
||||
requestType: 'DELETE');
|
||||
await theme.push(context, '/gitea/$owner/$name/issues/$number',
|
||||
await context.pushUrl('/gitea/$owner/$name/issues/$number',
|
||||
replace: true);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class GtIssueCommentScreen extends StatefulWidget {
|
||||
const GtIssueCommentScreen(this.owner, this.name, this.number,
|
||||
|
@ -67,8 +67,7 @@ class _GtIssueCommentScreenState extends State<GtIssueCommentScreen> {
|
|||
);
|
||||
}
|
||||
Navigator.pop(context, '');
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/gitea/${widget.owner}/${widget.name}/${widget.isPr ? 'pulls' : 'issues'}/${widget.number}',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/gitea.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class GtIssueFormScreen extends StatefulWidget {
|
||||
const GtIssueFormScreen(this.owner, this.name);
|
||||
|
@ -64,8 +64,7 @@ class _GtIssueFormScreenState extends State<GtIssueFormScreen> {
|
|||
return GiteaIssue.fromJson(v);
|
||||
});
|
||||
Navigator.pop(context);
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/gitea/${widget.owner}/${widget.name}/issues',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -261,7 +261,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
TextStyle(color: theme.palette.primary),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
theme.push(context,
|
||||
context.pushUrl(
|
||||
'https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/');
|
||||
},
|
||||
),
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/gestures.dart';
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/widgets/border_view.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:primer/primer.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -68,7 +69,7 @@ TextSpan createLinkSpan(
|
|||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
theme.push(context, url);
|
||||
context.pushUrl(url);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -158,3 +159,18 @@ class ListPayload<T, K> {
|
|||
bool hasMore;
|
||||
Iterable<T> items;
|
||||
}
|
||||
|
||||
extension MyHelper on BuildContext {
|
||||
pushUrl(String url, {bool replace = false}) {
|
||||
// Fimber.d(url);
|
||||
if (url.startsWith('/')) {
|
||||
if (replace) {
|
||||
this.replace(url);
|
||||
} else {
|
||||
push(url);
|
||||
}
|
||||
} else {
|
||||
launchStringUrl(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ActionEntry extends StatelessWidget {
|
||||
|
@ -16,7 +17,7 @@ class ActionEntry extends StatelessWidget {
|
|||
padding: EdgeInsets.zero,
|
||||
onPressed: () {
|
||||
if (onTap != null) onTap!();
|
||||
if (url != null) theme.push(context, url!);
|
||||
if (url != null) context.pushUrl(url!);
|
||||
},
|
||||
child: Icon(iconData, size: 22),
|
||||
);
|
||||
|
|
|
@ -14,7 +14,6 @@ class AvatarSize {
|
|||
}
|
||||
|
||||
class Avatar extends StatelessWidget {
|
||||
|
||||
const Avatar({
|
||||
required this.url,
|
||||
this.size = AvatarSize.medium,
|
||||
|
@ -56,7 +55,7 @@ class Avatar extends StatelessWidget {
|
|||
return LinkWidget(
|
||||
child: widget,
|
||||
onTap: () {
|
||||
context.read<ThemeModel>().push(context, linkUrl!);
|
||||
context.pushUrl(linkUrl!);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class EventItem extends StatelessWidget {
|
|||
style: TextStyle(color: theme.palette.primary),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
theme.push(context, url!);
|
||||
context.pushUrl(url!);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import 'package:provider/provider.dart';
|
|||
|
||||
// TODO:
|
||||
class CupertinoLink extends StatefulWidget {
|
||||
|
||||
const CupertinoLink({this.child, this.onTap});
|
||||
final Widget? child;
|
||||
final Function? onTap;
|
||||
|
@ -48,7 +47,6 @@ class _CupertinoLinkState extends State<CupertinoLink> {
|
|||
}
|
||||
|
||||
class LinkWidget extends StatelessWidget {
|
||||
|
||||
const LinkWidget({
|
||||
required this.child,
|
||||
this.url,
|
||||
|
@ -69,7 +67,7 @@ class LinkWidget extends StatelessWidget {
|
|||
padding: EdgeInsets.zero,
|
||||
onPressed: () async {
|
||||
if (onTap != null) onTap!();
|
||||
if (url != null) theme.push(context, url!);
|
||||
if (url != null) context.pushUrl(url!);
|
||||
},
|
||||
child: child,
|
||||
);
|
||||
|
|
|
@ -82,7 +82,6 @@ html {
|
|||
}
|
||||
|
||||
class MarkdownFlutterView extends StatelessWidget {
|
||||
|
||||
const MarkdownFlutterView(
|
||||
this.text, {
|
||||
this.basePaths,
|
||||
|
@ -134,7 +133,7 @@ class MarkdownFlutterView extends StatelessWidget {
|
|||
var y = path.join(x, url);
|
||||
if (y.startsWith('/')) y = y.substring(1);
|
||||
|
||||
return theme.push(context,
|
||||
return context.pushUrl(
|
||||
'/${basePaths![0]}/${basePaths![1]}/${basePaths![2]}?path=${y.urlencode}');
|
||||
}
|
||||
|
||||
|
@ -149,7 +148,7 @@ class MarkdownFlutterView extends StatelessWidget {
|
|||
for (var p in matchedPaths) {
|
||||
final m = matchPattern(url, p);
|
||||
if (m != null) {
|
||||
return theme.push(context,
|
||||
return context.pushUrl(
|
||||
url.replaceFirst(RegExp(r'https://github.com'), '/github'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ AntListItem createObjectTreeItem({
|
|||
}) {
|
||||
return AntListItem(
|
||||
prefix: _buildIcon(type, name),
|
||||
child: Text(name),
|
||||
extra: size == null ? null : Text(filesize(size)),
|
||||
onClick: () async {
|
||||
final finalUrl = [
|
||||
|
@ -51,5 +50,6 @@ AntListItem createObjectTreeItem({
|
|||
await launchStringUrl(finalUrl);
|
||||
},
|
||||
arrow: size == null ? const Icon(AntIcons.rightOutline) : null,
|
||||
child: Text(name),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ class ReleaseItem extends StatelessWidget {
|
|||
AntListItem(
|
||||
extra: IconButton(
|
||||
onPressed: () {
|
||||
theme.push(context, asset.downloadUrl);
|
||||
context.pushUrl(asset.downloadUrl);
|
||||
},
|
||||
icon: const Icon(Ionicons.download_outline),
|
||||
),
|
||||
|
|
|
@ -6,7 +6,6 @@ import 'package:git_touch/widgets/mutation_button.dart';
|
|||
import 'package:provider/provider.dart';
|
||||
|
||||
class UserHeader extends StatelessWidget {
|
||||
|
||||
const UserHeader({
|
||||
super.key,
|
||||
required this.avatarUrl,
|
||||
|
@ -33,7 +32,7 @@ class UserHeader extends StatelessWidget {
|
|||
MutationButton(
|
||||
text: 'Switch accounts',
|
||||
onTap: () {
|
||||
theme.push(context, '/login');
|
||||
context.pushUrl('/login');
|
||||
},
|
||||
)
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue