From 1381bc6537e7cb8f7eb9c18a2a4df10b9d1eec47 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 4 Jun 2020 16:09:28 +0530 Subject: Removes theme button --- README.md | 18 +++++++++++++++--- TODO.md | 1 + lib/pages/Home.dart | 27 ++++++++++++++------------- test/homeview_test.dart | 8 +++++++- test/utils.dart | 1 + 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 6865c9e..227c752 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,19 @@ # owyn Only What You Need (owyn) is a minimal launcher for android written in dart -## Motivation -There are a very few number of minimal launchers and even fewer are free and open source. -This is my attempt at filling the gap +## What do I need? +* A clock showing me the time +* A searchable list of apps +* Easy access to my favorite apps +* Ability to uninstall apps + +## Install +Grab an apk from the releases and install it. + +## Build it yourself +``` +flutter build apk --split-per-abi +``` + +The apks will be at `build/app/outputs/apk/release/` diff --git a/TODO.md b/TODO.md index 0cd75d1..321608d 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,7 @@ ## Global - [ ] Add icons in context menu + - [ ] Some good docs with a gif of ui - [X] Start writing tests - [X] Transision between pages between pages - [X] Find a way to preload both pages and stop from "loading" diff --git a/lib/pages/Home.dart b/lib/pages/Home.dart index 3e22f93..b812288 100644 --- a/lib/pages/Home.dart +++ b/lib/pages/Home.dart @@ -53,19 +53,20 @@ class StatusInfoCard extends StatelessWidget { Container( width: 40, height: 30, - child: IconButton( - padding: const EdgeInsets.all(0.0), - visualDensity: const VisualDensity(vertical: 0.0, horizontal: 0.0), - icon: Icon( - Icons.brightness_4, - color: theme.primaryColor, - size: 16.0, - semanticLabel: 'Toggle dark mode', - ), - tooltip: 'Toggle dark mode', - enableFeedback: true, - onPressed: () { toggleTheme(); } - ), + child: Text(''), + //child: IconButton( + //padding: const EdgeInsets.all(0.0), + //visualDensity: const VisualDensity(vertical: 0.0, horizontal: 0.0), + //icon: Icon( + //Icons.brightness_4, + //color: theme.primaryColor, + //size: 16.0, + //semanticLabel: 'Toggle dark mode', + //), + //tooltip: 'Toggle dark mode', + //enableFeedback: true, + //onPressed: () { toggleTheme(); } + //), ), ], ), diff --git a/test/homeview_test.dart b/test/homeview_test.dart index 770956d..3f62e65 100644 --- a/test/homeview_test.dart +++ b/test/homeview_test.dart @@ -16,8 +16,14 @@ void main() { makeApp('Youtube', 'org.example.youtube'), ]; - testWidgets('Should render with no errors', (WidgetTester tester) async { + testWidgets('Should render with no errors with 0 favorite items', (WidgetTester tester) async { await tester.pumpWidget(wrapper(HomeView(dateTime: time, favoriteApps: []))); + await tester.pump(); + }); + + testWidgets('Should render with no errors with some favorite items', (WidgetTester tester) async { + await tester.pumpWidget(wrapper(HomeView(dateTime: time, favoriteApps: favoriteApps))); + await tester.pump(); }); testWidgets('Should show formatted date correctly', (WidgetTester tester) async { diff --git a/test/utils.dart b/test/utils.dart index c122229..e85fde8 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:device_apps/device_apps.dart'; Widget wrapper(Widget view) { return MaterialApp( -- cgit v1.3.1