mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
Fix flutter analyze
This commit is contained in:
@ -402,7 +402,7 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
|||||||
Future _removeExistingClone(String baseDirPath) async {
|
Future _removeExistingClone(String baseDirPath) async {
|
||||||
var baseDir = Directory(p.join(baseDirPath, "journal"));
|
var baseDir = Directory(p.join(baseDirPath, "journal"));
|
||||||
var dotGitDir = Directory(p.join(baseDir.path, ".git"));
|
var dotGitDir = Directory(p.join(baseDir.path, ".git"));
|
||||||
bool exists = await dotGitDir.exists();
|
bool exists = dotGitDir.existsSync();
|
||||||
if (exists) {
|
if (exists) {
|
||||||
Fimber.d("Removing " + baseDir.path);
|
Fimber.d("Removing " + baseDir.path);
|
||||||
await baseDir.delete(recursive: true);
|
await baseDir.delete(recursive: true);
|
||||||
|
@ -21,8 +21,8 @@ class StateContainer extends StatefulWidget {
|
|||||||
});
|
});
|
||||||
|
|
||||||
static StateContainerState of(BuildContext context) {
|
static StateContainerState of(BuildContext context) {
|
||||||
return (context.inheritFromWidgetOfExactType(_InheritedStateContainer)
|
return context
|
||||||
as _InheritedStateContainer)
|
.dependOnInheritedWidgetOfExactType<_InheritedStateContainer>()
|
||||||
.data;
|
.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class StateContainerState extends State<StateContainer> {
|
|||||||
p.join(appState.gitBaseDirectory, appState.remoteGitRepoFolderName));
|
p.join(appState.gitBaseDirectory, appState.remoteGitRepoFolderName));
|
||||||
var dotGitDir = Directory(p.join(remoteGitDir.path, ".git"));
|
var dotGitDir = Directory(p.join(remoteGitDir.path, ".git"));
|
||||||
|
|
||||||
bool exists = await dotGitDir.exists();
|
bool exists = dotGitDir.existsSync();
|
||||||
if (exists) {
|
if (exists) {
|
||||||
await remoteGitDir.delete(recursive: true);
|
await remoteGitDir.delete(recursive: true);
|
||||||
}
|
}
|
||||||
|
@ -50,12 +50,12 @@ class AppDrawer extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).highlightColor,
|
color: Theme.of(context).highlightColor,
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: const Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: EdgeInsets.all(8.0),
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: const AssetImage('assets/icon/icon.png'),
|
image: AssetImage('assets/icon/icon.png'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user