mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00
18 lines
406 B
Dart
18 lines
406 B
Dart
import 'dart:async';
|
|
import 'dart:io';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
const _platform = MethodChannel('gitjournal.io/git');
|
|
|
|
///
|
|
/// This gives us the directory where all the git repos will be stored
|
|
///
|
|
Future<Directory> getGitBaseDirectory() async {
|
|
final String path = await _platform.invokeMethod('getBaseDirectory');
|
|
if (path == null) {
|
|
return null;
|
|
}
|
|
return Directory(path);
|
|
}
|