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:
Vishesh Handa
2020-05-01 11:04:21 +02:00
parent 49bf02bf15
commit 1a52fb754d

View File

@ -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();
},