Files
GitJournal/lib/gitapp.dart
Vishesh Handa 8b40cd2285 GitCommit: Let us specify the date time
The Timezone handling is java seems to be quite strange, so I'm going to
skip it for now and fix it later. We do seem to have proper timezone
classes in future versions of Java, but that requires me to increase the
minSDKVersion, and therefore not support very old android devices.
2019-01-23 11:03:06 +01:00

65 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:journal/storage/git.dart';
class GitApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Git App',
home: Scaffold(
appBar: AppBar(
title: Text('Git Test'),
),
body: Column(
children: buildGitButtons(),
),
),
);
}
}
buildGitButtons() {
return <Widget>[
RaisedButton(
child: Text("Generate Keys"),
onPressed: () {
generateSSHKeys(comment: "Git Sample App");
}),
RaisedButton(
child: Text("Git Clone"),
onPressed: () async {
gitClone("root@bcn.vhanda.in:git/test", "journal");
},
),
RaisedButton(
child: Text("Git Pull"),
onPressed: () async {
gitPull("journal");
},
),
RaisedButton(
child: Text("Git Add"),
onPressed: () async {
await gitAdd("journal", ".");
},
),
RaisedButton(
child: Text("Git Push"),
onPressed: () async {
gitPush("journal");
},
),
RaisedButton(
child: Text("Git Commit"),
onPressed: () async {
gitCommit(
gitFolder: "journal",
authorEmail: "noemail@example.com",
authorName: "Vishesh Handa",
message: "Default message from GitJournal",
when: "2017-10-20T01:21:10+02:00",
);
}),
];
}