mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-20 23:30:02 +08:00

This way initially all the changes are performed on the local git repo, and then later they are applied on the remote git repo. Currently we just copy the files, but we should be cherry-picking each commit and applying it properly.
61 lines
1.7 KiB
Dart
61 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:journal/state_container.dart';
|
|
|
|
class AppDrawer extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Widget setupGitButton = new Container();
|
|
var appState = StateContainer.of(context).appState;
|
|
|
|
if (!appState.remoteGitRepoConfigured) {
|
|
setupGitButton = ListTile(
|
|
title: new Text('Setup Git Sync'),
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
Navigator.pushNamed(context, "/setupRemoteGit");
|
|
},
|
|
);
|
|
}
|
|
|
|
return new Drawer(
|
|
child: new ListView(
|
|
// Important: Remove any padding from the ListView.
|
|
padding: EdgeInsets.zero,
|
|
children: <Widget>[
|
|
new DrawerHeader(
|
|
decoration: new BoxDecoration(
|
|
color: Theme.of(context).buttonColor,
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage('assets/icon/icon.png'),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
setupGitButton,
|
|
new ListTile(
|
|
title: new Text('Share App'),
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
// Update the state of the app
|
|
// ...
|
|
},
|
|
),
|
|
new ListTile(
|
|
title: new Text('Settings'),
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
Navigator.pushNamed(context, "/settings");
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|