mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 19:36:25 +08:00
AppMenuButton: Remove badge for when git remote not configured
I cannot seem to get it to look nice with this new version of Badges and now I'm reconsidering if it should be shown at all. The user doesn't **need** to setup the git repo. This app can be used without it perfectly fine.
This commit is contained in:
@ -1,21 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:badges/badges.dart';
|
||||
|
||||
import 'package:gitjournal/state_container.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class GJAppBarMenuButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var container = Provider.of<StateContainer>(context);
|
||||
final appState = container.appState;
|
||||
|
||||
bool shouldShowBadge =
|
||||
!appState.remoteGitRepoConfigured && appState.hasJournalEntries;
|
||||
var appBarMenuButton = BadgeIconButton(
|
||||
var appBarMenuButton = IconButton(
|
||||
key: const ValueKey("DrawerButton"),
|
||||
icon: const Icon(Icons.menu),
|
||||
itemCount: shouldShowBadge ? 1 : 0,
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openDrawer();
|
||||
},
|
||||
|
Reference in New Issue
Block a user