Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pikabol88 committed Mar 29, 2021
2 parents 26ffc9e + cb53615 commit d5762d7
Show file tree
Hide file tree
Showing 45 changed files with 662 additions and 392 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- run: git lfs pull
- run: flutter pub get
working-directory: ./braille_abc
- run: flutter build ios --no-codesign --no-tree-shake-icons
- run: flutter build ios --release --no-codesign --no-tree-shake-icons
working-directory: ./braille_abc


Expand All @@ -64,7 +64,7 @@ jobs:
- run: git lfs pull
- run: flutter pub get
working-directory: ./braille_abc
- run: flutter build apk --no-tree-shake-icons
- run: flutter build apk --release --no-tree-shake-icons
working-directory: ./braille_abc

- uses: actions/upload-artifact@v1
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Release

on:
push:
tags:
- 'v*.*'

jobs:
artifact_android:
name: Build with Flutter for Android
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
lfs: true
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- uses: actions/setup-java@v1
with:
java-version: '11.x'

- run: git lfs pull
- run: flutter pub get
working-directory: ./braille_abc
- run: flutter build apk --release --no-tree-shake-icons
working-directory: ./braille_abc
- uses: actions/upload-artifact@v1
with:
name: release-apk
path: braille_abc/build/app/outputs/apk/release/app-release.apk


release:
name: Create release
runs-on: ubuntu-latest
needs: [artifact_android]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/download-artifact@v1
with:
name: release-apk

# Collect tags info
- name: Get previous tag name
id: prevtag
uses: oprypin/find-latest-tag@v1
with:
repository: braille-systems/learnbraille_ios
releases-only: true
- name: Get current tag name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

# Generate changelog
- uses: actions/setup-node@v2
- run: npm install git-release-notes
- run: mkdir -p docs/release/${{ env.RELEASE_VERSION }}
- run: npx git-release-notes ${{ steps.prevtag.outputs.tag }}..${{ env.RELEASE_VERSION }} markdown > docs/release/${{ env.RELEASE_VERSION }}/CHANGELOG.md

# Create release
- uses: softprops/action-gh-release@v1
with:
name: Learn Braille IOS ${{ env.RELEASE_VERSION }}
body_path: docs/release/${{ env.RELEASE_VERSION }}/CHANGELOG.md
files: |
LICENSE
release-apk/app-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions braille_abc/lib/braille_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:braille_abc/screens/home_screen.dart';

@immutable
class BrailleApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
Expand Down
3 changes: 2 additions & 1 deletion braille_abc/lib/components/body_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import 'package:flutter/cupertino.dart';

import 'package:braille_abc/models/app_model.dart';

@immutable
class Body extends StatefulWidget {
final int index;

Body(this.index);
const Body(this.index);

@override
_BodyState createState() => _BodyState();
Expand Down
33 changes: 18 additions & 15 deletions braille_abc/lib/components/bottom_bar_widget.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import 'package:flutter/cupertino.dart';

import 'package:braille_abc/models/app_icons.dart';
import 'package:braille_abc/models/app_model.dart';
import 'package:braille_abc/components/body_widget.dart';
import 'package:braille_abc/models/app_names.dart';

import 'package:braille_abc/style.dart';
import 'package:flutter/cupertino.dart';

final scakey = GlobalKey<_BottomState>();

@immutable
class Bottom extends StatefulWidget {
Bottom({Key key}) : super(key: key);
const Bottom({Key key}) : super(key: key);

@override
_BottomState createState() => _BottomState();
Expand Down Expand Up @@ -50,20 +53,20 @@ class _BottomState extends State<Bottom> {
tabBar: _disableTapBar
? InvisibleCupertinoTabBar()
: CupertinoTabBar(
onTap: onItemTapped,
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(AppIcon.getIcon(AppIcons.MenuScreen)),
label: ScreenNames.getName(ScreenType.Home),
),
for (int i = 0; i < AppModel.menuButton.length; i++)
BottomNavigationBarItem(
backgroundColor: AppColors.expandBackground,
icon: Icon(AppModel.menuButton[i].icon),
label: AppModel.menuButton[i].name,
),
],
onTap: onItemTapped,
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(AppIcon.getIcon(AppIcons.MenuScreen)),
label: ScreenNames.getName(ScreenType.Home),
),
for (int i = 0; i < AppModel.menuButton.length; i++)
BottomNavigationBarItem(
backgroundColor: AppColors.expandBackground,
icon: Icon(AppModel.menuButton[i].icon),
label: AppModel.menuButton[i].name,
),
],
),
tabBuilder: (context, index) {
return CupertinoTabView(builder: (context) {
return CupertinoPageScaffold(
Expand Down
35 changes: 20 additions & 15 deletions braille_abc/lib/components/expandable_list_widget.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import 'package:braille_abc/shared/non_swipeable.dart';
import 'package:braille_abc/style.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'package:braille_abc/models/section_model.dart';
import 'package:braille_abc/components/expansion_section_widget.dart';

@immutable
class MyExpandableList extends StatefulWidget {
const MyExpandableList({
Key key,
Expand All @@ -19,21 +21,24 @@ class MyExpandableList extends StatefulWidget {
class _MyExpandableListState extends State<MyExpandableList> {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 25, horizontal: 15),
child: Card(
color: AppColors.expandBackground,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
for (int i = 0; i < widget.model.length; i++)
ExpansionSection(
sectionIcon: widget.model[i].icon,
sectionName: widget.model[i].name,
child: widget.model[i].expandedList,
),
],
return nonSwipeable(
context,
CupertinoPageScaffold(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 25, horizontal: 15),
child: Card(
color: AppColors.expandBackground,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
for (int i = 0; i < widget.model.length; i++)
ExpansionSection(
sectionIcon: widget.model[i].icon,
sectionName: widget.model[i].name,
child: widget.model[i].expandedList,
),
],
),
),
),
),
Expand Down
3 changes: 2 additions & 1 deletion braille_abc/lib/components/expansion_section_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import 'package:braille_abc/style.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

@immutable
class ExpansionSection extends StatefulWidget {
ExpansionSection({
const ExpansionSection({
Key key,
this.sectionIcon = CupertinoIcons.add,
this.sectionName,
Expand Down
6 changes: 6 additions & 0 deletions braille_abc/lib/components/help_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:braille_abc/style.dart';
import 'package:braille_abc/components/expansion_section_widget.dart';
import 'package:braille_abc/models/screen_model.dart';

@immutable
class MainMenuHelp extends Screen {
const MainMenuHelp({
Key key,
Expand All @@ -33,6 +34,7 @@ class MainMenuHelp extends Screen {
}
}

@immutable
class GeneralHelp extends Screen {
const GeneralHelp({
Key key,
Expand Down Expand Up @@ -65,6 +67,7 @@ class GeneralHelp extends Screen {
}
}

@immutable
class DictionaryHelp extends Screen {
const DictionaryHelp({
Key key,
Expand All @@ -89,6 +92,7 @@ class DictionaryHelp extends Screen {
}
}

@immutable
class LetterViewHelp extends Screen {
const LetterViewHelp({
Key key,
Expand Down Expand Up @@ -136,6 +140,7 @@ class LetterViewHelp extends Screen {
}
}

@immutable
class PracticeHelp extends Screen {
const PracticeHelp({
Key key,
Expand Down Expand Up @@ -179,6 +184,7 @@ class PracticeHelp extends Screen {
}
}

@immutable
class LetterPracticeHelp extends Screen {
const LetterPracticeHelp({
Key key,
Expand Down
12 changes: 6 additions & 6 deletions braille_abc/lib/components/letter_widget.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:braille_abc/style.dart';

import 'package:braille_abc/models/app_names.dart';
import 'package:braille_abc/shared/screen_params.dart';

import 'package:braille_abc/style.dart';
@immutable
class LetterWidget extends StatelessWidget {
const LetterWidget({Key key, @required this.title, @required this.symbol}) : super(key: key);

Expand All @@ -28,10 +28,10 @@ class LetterWidget extends StatelessWidget {
flex: 1,
child: Center(
child: AutoSizeText(
SectionNames.getName(title),
style: const TextStyle(fontSize: 30.0, color: AppColors.symbolText, fontWeight: FontWeight.bold),
maxLines: 1,
)),
SectionNames.getName(title),
style: const TextStyle(fontSize: 30.0, color: AppColors.symbolText, fontWeight: FontWeight.bold),
maxLines: 1,
)),
),
Flexible(
flex: 2,
Expand Down
4 changes: 3 additions & 1 deletion braille_abc/lib/components/menu_button_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:braille_abc/models/practice_model.dart';
import 'package:braille_abc/components/bottom_bar_widget.dart';
import 'package:braille_abc/style.dart';

@immutable
class MenuButtonWidget extends StatefulWidget {
const MenuButtonWidget({
Key key,
Expand All @@ -26,6 +27,7 @@ class MenuButtonWidget extends StatefulWidget {
_MenuButtonWidget createState() => _MenuButtonWidget();
}


class _MenuButtonWidget extends State<MenuButtonWidget> {
@override
void initState() {
Expand All @@ -35,7 +37,7 @@ class _MenuButtonWidget extends State<MenuButtonWidget> {

@override
Widget build(BuildContext context) {
return Semantics(
return Semantics(
label: widget.menuButton.name,
child: ElevatedButton(
style:AppDecorations.menuButton,
Expand Down
3 changes: 3 additions & 0 deletions braille_abc/lib/components/navigation_bar_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:braille_abc/components/bottom_bar_widget.dart';
import 'package:braille_abc/models/app_names.dart';
import 'package:braille_abc/models/screen_model.dart';

@immutable
class NavigationBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
const NavigationBar({
Key key,
Expand All @@ -20,6 +21,8 @@ class NavigationBar extends StatelessWidget implements ObstructingPreferredSizeW
final String title;
final Screen currentPage;

//bool displayBottomBar(Widget screen) => AppModel.navigationScreens.toString().contains(screen.toString());

@override
Widget build(BuildContext context) {
return CupertinoNavigationBar(
Expand Down
Loading

0 comments on commit d5762d7

Please sign in to comment.