This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
252 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class About extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text( | ||
"About", | ||
), | ||
), | ||
|
||
body: ListView( | ||
padding: EdgeInsets.symmetric(horizontal: 20), | ||
children: <Widget>[ | ||
Text( | ||
"Simple file explorer made with Flutter by JideGuru😁", | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:filex/providers/browse_provider.dart'; | ||
import 'package:filex/screens/main_screen.dart'; | ||
import 'package:filex/util/consts.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/services.dart'; | ||
import 'package:flutter_icons/flutter_icons.dart'; | ||
import 'package:page_transition/page_transition.dart'; | ||
import 'package:permission_handler/permission_handler.dart'; | ||
import 'package:provider/provider.dart'; | ||
|
||
class Splash extends StatefulWidget { | ||
@override | ||
_SplashState createState() => _SplashState(); | ||
} | ||
|
||
class _SplashState extends State<Splash> { | ||
startTimeout() { | ||
return Timer(Duration(seconds: 2), handleTimeout); | ||
} | ||
|
||
|
||
void handleTimeout() { | ||
changeScreen(); | ||
} | ||
|
||
changeScreen() async { | ||
PermissionStatus permission = await PermissionHandler().checkPermissionStatus(PermissionGroup.storage); | ||
if(permission != PermissionStatus.granted){ | ||
PermissionHandler().requestPermissions([PermissionGroup.storage]).then((v){ | ||
|
||
}).then((v) async{ | ||
PermissionStatus permission1 = await PermissionHandler().checkPermissionStatus(PermissionGroup.storage); | ||
if(permission1 == PermissionStatus.granted){ | ||
Navigator.pushReplacement( | ||
context, | ||
PageTransition( | ||
type: PageTransitionType.rightToLeft, | ||
child: MainScreen(), | ||
), | ||
); | ||
Provider.of<BrowseProvider>(context, listen: false).checkSpace(); | ||
} | ||
}); | ||
}else{ | ||
Navigator.pushReplacement( | ||
context, | ||
PageTransition( | ||
type: PageTransitionType.rightToLeft, | ||
child: MainScreen(), | ||
), | ||
); | ||
Provider.of<BrowseProvider>(context, listen: false).checkSpace(); | ||
} | ||
} | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
SystemChrome.setEnabledSystemUIOverlays([]); | ||
startTimeout(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
body: Center( | ||
child: Column( | ||
// mainAxisSize: MainAxisSize.max, | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: <Widget>[ | ||
Icon( | ||
Feather.folder, | ||
color: Theme.of(context).accentColor, | ||
size: 70, | ||
), | ||
SizedBox(height: 20,), | ||
Text( | ||
"${Constants.appName}", | ||
style: TextStyle( | ||
color: Theme.of(context).accentColor, | ||
fontSize: 25, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.