Skip to content

Commit

Permalink
app drawer chnaged and make launcher responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
jspw committed Apr 19, 2021
1 parent dc73da0 commit eed3e88
Show file tree
Hide file tree
Showing 24 changed files with 357 additions and 60 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Ubuntu Launcher
<a href="https://github.com/jspw/Ubuntu-Launcher/releases">
<img src="https://img.shields.io/github/downloads/jspw/ubuntu-launcher/total" />
</a>
<a href="https://github.com/jspw/Ubuntu-Launcher/releases/tag/2.1.0">
<a href="https://github.com/jspw/Ubuntu-Launcher/releases/tag/2.2.0">
<img src="https://img.shields.io/github/v/release/jspw/ubuntu-launcher" />
</a>
<a href='https://github.com/jspw/Ubuntu-Launcher/issues'>
Expand All @@ -31,9 +31,9 @@ width="150" hspace="10" vspace="10">
Though flutter is a cross platform UI framework, the launcher has android version only for now.Our launcher is only available on github. Any update and release version will be available here.

<p align="center">
<a href="https://github.com/jspw/Ubuntu-Launcher/releases/tag/2.1.0">
<a href="https://github.com/jspw/Ubuntu-Launcher/releases/tag/2.2.0">
<img alt="Get it on Google Play"
src="https://img.shields.io/github/downloads/jspw/ubuntu-launcher/2.1.0/total?label=Download%20Now&logo=ubuntu%20launcher&style=for-the-badge" />
src="https://img.shields.io/github/downloads/jspw/ubuntu-launcher/2.2.0/total?label=Download%20Now&logo=ubuntu%20launcher&style=for-the-badge" />
</a>
</p>

Expand All @@ -48,6 +48,7 @@ At first, it was made for myself having simple look and customization. Then i de

- Use as default launcher
- Simple & Fast UI
- Responsive
- Clean homeScreen
- Slide Bar
- Shortcut Apps on SideBar
Expand All @@ -59,6 +60,7 @@ At first, it was made for myself having simple look and customization. Then i de
#### Latest Features

- In App drawer, **Press Long** on app to open App Setting
- Responsive (Can use as lanscape mode)

## Requirements

Expand All @@ -68,7 +70,7 @@ At first, it was made for myself having simple look and customization. Then i de

## Install

- Latest : [Ubuntu Launcher 2.1.0](https://github.com/jspw/Ubuntu-Launcher/releases/tag/2.1.0)
- Latest : [Ubuntu Launcher 2.2.0](https://github.com/jspw/Ubuntu-Launcher/releases/tag/2.2.0)
- Old Versions : [Releases](https://github.com/jspw/Ubuntu-Launcher/releases)

Download the apk file and install in your android device.
Expand All @@ -79,28 +81,30 @@ Download the apk file and install in your android device.

- **Loading Screen** (When app runs for the first time)

![loading](fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg)
![loading](assets/ss/loading.png)

- **Home Screen** (Empty for simplicity)

![Slidebar](fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg)
![Home](assets/ss/home.png)

- **Side Bar** (Shortcut Menu Options) -> Swap from Left to Righ to open

![sidebar](fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg)
![sidebar](assets/ss/sidebar.png)
![vertical](assets/ss/vertical_view.png)

- **App Drawer** (Installed accesible apps)

![apps](fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg)
![apps](assets/ss/apps.png)
![](assets/ss/apps_vertical_view.png)

- **Sort Option** (Sort by Apps Name, Installation and Update time)

![SortOption](fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg)
![SortOption](assets/ss/sorts.png)

### Demo

<p align='center'>
<img src='fastlane/metadata/android/en-US/images/phoneScreenshots/8.gif' />
<img src="./assets/ss/demo.gif" />
</p>

## Permissions
Expand Down
Binary file added assets/images/drawer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/images/view-app-grid-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/apps_vertical_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/sidebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/sorts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ss/vertical_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'Utility/libraries.dart';
import 'src/helpers/libraries.dart';

void main() {
runApp(MyApp());
Expand Down
8 changes: 8 additions & 0 deletions lib/src/blocs/cubit/apps_cubit.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:bloc/bloc.dart';
import 'package:meta/meta.dart';

part 'apps_state.dart';

class AppsCubit extends Cubit<AppsState> {
AppsCubit() : super(AppsInitial());
}
6 changes: 6 additions & 0 deletions lib/src/blocs/cubit/apps_state.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
part of 'apps_cubit.dart';

@immutable
abstract class AppsState {}

class AppsInitial extends AppsState {}
6 changes: 4 additions & 2 deletions lib/Utility/libraries.dart → lib/src/helpers/libraries.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ export 'package:url_launcher/url_launcher.dart';
export 'package:device_apps/device_apps.dart';
export 'package:android_intent/android_intent.dart';
export 'package:platform/platform.dart';
export 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';


//Custom

export '../UI/Screens/home.dart';
export '../ui/screens/home.dart';
export 'routes.dart';
export '../UI/Screens/apps.dart';
export '../ui/screens/apps.dart';
export 'syncAppInformations.dart';
export 'routeAnimatior.dart';
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/Utility/routes.dart → lib/src/helpers/routes.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'libraries.dart';
import './libraries.dart';

class Routes {
static routes() {
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions lib/src/models/apps.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Apps {

}
102 changes: 88 additions & 14 deletions lib/UI/Screens/apps.dart → lib/src/ui/screens/apps.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../Utility/libraries.dart';
import '../../helpers/libraries.dart';

class Apps extends StatefulWidget {
List<Application> apps;
Expand All @@ -11,7 +11,7 @@ class Apps extends StatefulWidget {
// TODO: implement createState
// throw UnimplementedError();
return AppsState(apps, sortType);
}
}
}

class AppsState extends State {
Expand Down Expand Up @@ -80,8 +80,8 @@ class AppsState extends State {

@override
void initState() {
appInfo();
super.initState();
appInfo();
}

@override
Expand All @@ -90,10 +90,18 @@ class AppsState extends State {
// arguments = ModalRoute.of(context).settings.arguments;
}

@override
void dispose() {
// TODO: implement dispose
super.dispose();
}

@override
Widget build(BuildContext context) {
final double height = MediaQuery.of(context).size.height;
final double width = MediaQuery.of(context).size.width;
final deviceHeight = MediaQuery.of(context).size.height;
final deviceWidth = MediaQuery.of(context).size.width;

print(deviceWidth);

return WillPopScope(
onWillPop: () async => false,
Expand All @@ -110,9 +118,13 @@ class AppsState extends State {
leading: GestureDetector(
onTap: () => Navigator.pop(context, [apps, sortType]),
child: Container(
child: Image.asset(
"assets/images/ic_launcher.png",
fit: BoxFit.cover,
padding: const EdgeInsets.all(5),
child: Hero(
tag: 'drawer',
child: Image.asset(
"assets/images/drawer.png",
fit: BoxFit.cover,
),
),
),
),
Expand All @@ -135,11 +147,11 @@ class AppsState extends State {
),
),
)
: GridView.count(
padding: const EdgeInsets.only(left: 50),
physics: BouncingScrollPhysics(),
crossAxisCount: 4,
children: List.generate(apps.length, (int i) {
: StaggeredGridView.countBuilder(
padding: const EdgeInsets.only(left: 40),
crossAxisCount: ((4 * deviceWidth) / 432).round(),
itemCount: apps.length,
itemBuilder: (BuildContext context, int i) {
Application app = apps[i];
return GestureDetector(
onTap: () {
Expand Down Expand Up @@ -192,8 +204,70 @@ class AppsState extends State {
),
)
: null);
}),
},
staggeredTileBuilder: (int index) =>
new StaggeredTile.count(1, 1),
),

// GridView.count(
// padding: const EdgeInsets.only(left: 50),
// physics: BouncingScrollPhysics(),
// crossAxisCount: 4,
// children: List.generate(apps.length, (int i) {
// Application app = apps[i];
// return GestureDetector(
// onTap: () {
// DeviceApps.openApp(app.packageName);
// // DeviceApps.openAppSettings(app.packageName);
// Navigator.pop(context, [apps, sortType]);
// },
// onLongPress: () async {
// if (LocalPlatform().isAndroid) {
// final AndroidIntent intent = AndroidIntent(
// action: 'action_application_details_settings',
// data: 'package:' +
// app.packageName, // replace com.example.app with your applicationId
// );
// await intent.launch();
// }

// // Navigator.pop(context, [apps, sortType]);
// },
// // onLongPress: () =>
// // _openApplicationDetails(app.packageName),
// child: app is ApplicationWithIcon
// ? GridTile(
// child: Padding(
// padding: const EdgeInsets.all(10.0),
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.center,
// mainAxisAlignment:
// MainAxisAlignment.spaceEvenly,
// children: <Widget>[
// Container(
// child: CircleAvatar(
// backgroundImage: MemoryImage(
// app.icon,
// ),
// backgroundColor: Colors.white,
// ),
// ),
// Text(
// app.appName,
// style: TextStyle(
// color: Colors.white,
// fontWeight: FontWeight.bold,
// ),
// overflow: TextOverflow.ellipsis,
// ),
// ],
// ),
// ),
// )
// : null);
// }),
// ),
),
),
);
Expand Down
68 changes: 39 additions & 29 deletions lib/UI/Screens/home.dart → lib/src/ui/screens/home.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../Utility/libraries.dart';
import '../../helpers/libraries.dart';

class Home extends StatefulWidget {
static const route = '/home';
Expand Down Expand Up @@ -130,10 +130,12 @@ class HomeState extends State {
opacity: sidebarOpacity,
child: SafeArea(
child: Container(
color: Colors.pink.withOpacity(0.5),
color: Color.fromRGBO(39, 21, 40, 0.5),
// Colors.pink.withOpacity(0.5),
height: MediaQuery.of(context).size.height,
width: 60.0,
child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// SizedBox(
// height: 30.0,
Expand All @@ -143,10 +145,16 @@ class HomeState extends State {
navigateScreen();
},
child: Container(
width: 35,
child: Image.asset(
"assets/images/ic_launcher.png",
fit: BoxFit.cover,
padding: const EdgeInsets.all(10),
// width: 35,
child: ClipRRect(
child: Hero(
tag: 'drawer',
child: Image.asset(
"assets/images/drawer.png",
fit: BoxFit.cover,
),
),
),
),
),
Expand Down Expand Up @@ -194,29 +202,31 @@ class HomeState extends State {
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
)
: Container(
key: scaffoldKey,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/wallpaper.jpg"),
fit: BoxFit.cover,
)),
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: Row(
children: <Widget>[
GestureDetector(
onTap: () {
scaffoldKey.currentState.openDrawer();
},
child: Container(
color: Colors.transparent,
height: MediaQuery.of(context).size.height,
child: SizedBox(
width: 70,
)),
),
],
: SafeArea(
child: Container(
key: scaffoldKey,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/wallpaper.jpg"),
fit: BoxFit.cover,
)),
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: Row(
children: <Widget>[
GestureDetector(
onTap: () {
scaffoldKey.currentState.openDrawer();
},
child: Container(
color: Colors.transparent,
height: MediaQuery.of(context).size.height,
child: SizedBox(
width: 70,
)),
),
],
),
),
),
drawerEnableOpenDragGesture: (apps == null) ? false : true,
Expand Down
File renamed without changes.
Loading

0 comments on commit eed3e88

Please sign in to comment.