Skip to content

Commit

Permalink
Merge branch 'main' into #57-add-introduction-to-shorebird
Browse files Browse the repository at this point in the history
  • Loading branch information
happycastle114 authored Sep 19, 2023
2 parents a6dd3fc + be759a3 commit 88bd040
Show file tree
Hide file tree
Showing 20 changed files with 785 additions and 239 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
FLUTTER_VERSION: "3"
JAVA_VERSION: "11"

jobs:
build-android:
name: Build Android
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: ${{ env.JAVA_VERSION }}
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Create .env
run: |
echo "FRONT_ADDRESS=https://taxi.sparcs.org" > .env
echo "BACK_ADDRESS=https://taxi.sparcs.org" >> .env
- name: Create key.properties
run: |
echo "UPLOAD_STORE_FILE=../ci.jks" > android/key.properties
echo "UPLOAD_STORE_PASSWORD=123456" >> android/key.properties
echo "UPLOAD_KEY_PASSWORD=123456" >> android/key.properties
echo "UPLOAD_KEY_ALIAS=ci" >> android/key.properties
- name: Create google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' | base64 --decode > android/app/google-services.json
- name: Install dependencies
run: flutter pub get
- name: Build APK
run: flutter build apk --release

build-ios:
name: Build iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Create .env
run: |
echo "FRONT_ADDRESS=https://taxi.sparcs.org" > .env
echo "BACK_ADDRESS=https://taxi.sparcs.org" >> .env
- name: Create GoogleService-Info.plist
run: echo '${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}' | base64 --decode > ios/Runner/GoogleService-Info.plist
- name: Install dependencies
run: flutter pub get
- name: Build iOS
run: flutter build ios --release --no-codesign
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ GeneratedPluginRegistrant.java
key.properties
**/*.keystore
**/*.jks
!/ci.jks
17 changes: 16 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
package="org.sparcs.taxi_app">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Expand All @@ -11,6 +11,11 @@

<queries>
<package android:name="com.kakao.talk" />
<package android:name="viva.republica.toss" />
<package android:name="com.kakao.taxi" />
<package android:name="com.ubercab" />
<package android:name="kr.co.orangetaxi.passenger" />
<package android:name="com.instagram.android" />
</queries>
<application
android:label="Taxi"
Expand Down Expand Up @@ -77,5 +82,15 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.com.shekarmudaliyar.social_share"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class MainActivity: FlutterActivity() {
val intent = Intent.parseUri(call.arguments as String, Intent.URI_INTENT_SCHEME)

if (intent.resolveActivity(packageManager) != null) {
packageManager.getLaunchIntentForPackage(""+intent.getPackage())
startActivity(intent)
result.success(null)
} else {
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/res/xml/filepaths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<cache-path name="image" path="/"/>
</paths>
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
Expand Down
Binary file added android/ci.jks
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
14 changes: 14 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,24 @@
</array>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>FacebookAppID</key>
<string>278480901639073</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>itms-beta</string>
<string>itms</string>
<string>instagram-stories</string>
<string>facebook-stories</string>
<string>facebook</string>
<string>instagram</string>
<string>twitter</string>
<string>whatsapp</string>
<string>tg</string>
<string>supertoss</string>
<string>uber</string>
<string>tmoneyonda</string>
<string>kakaotalk</string>
<string>kakaot</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
Expand Down
11 changes: 0 additions & 11 deletions lib/constants/constants.dart

This file was deleted.

173 changes: 173 additions & 0 deletions lib/constants/theme.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

//primaryColor 지정 (색상코드: #6E3647)
final Map<int, Color> primaryColor1 = {
50: const Color.fromRGBO(110, 54, 120, .1),
100: const Color.fromRGBO(110, 54, 120, .2),
200: const Color.fromRGBO(110, 54, 120, .3),
300: const Color.fromRGBO(110, 54, 120, .4),
400: const Color.fromRGBO(110, 54, 120, .5),
500: const Color.fromRGBO(110, 54, 120, .6),
600: const Color.fromRGBO(110, 54, 120, .7),
700: const Color.fromRGBO(110, 54, 120, .8),
800: const Color.fromRGBO(110, 54, 120, .9),
900: const Color.fromRGBO(110, 54, 120, 1),
};
final MaterialColor taxiPrimaryMaterialColor =
MaterialColor(0xFF6E3678, primaryColor1);
const Color taxiPrimaryColor = Color(0xFF6E3678);
const Color taxiMainBackgroundColor = Colors.white;
const Color toastBackgroundColor = Colors.white;
const Color toastTextColor = Colors.black;
const Color notiColor = Color(0x66C8C8C8);
final Color dialogBarrierColor = Colors.black.withOpacity(0.6);

double devicePixelRatio = 3.0;
const double taxiDialogPadding = 15.0;
const double taxiNotificationPadding = 20.0;
final defaultDialogUpperTitlePadding =
Padding(padding: EdgeInsets.symmetric(vertical: 36.0 / devicePixelRatio));

final defaultDialogMedianTitlePadding =
Padding(padding: EdgeInsets.all(6 / devicePixelRatio));

final defaultDialogLowerTitlePadding =
Padding(padding: EdgeInsets.symmetric(vertical: 24 / devicePixelRatio));

final defaultDialogVerticalMedianButtonPadding = Padding(
padding:
EdgeInsets.symmetric(horizontal: taxiDialogPadding / devicePixelRatio));

final defaultDialogLowerButtonPadding = Padding(
padding:
EdgeInsets.only(bottom: (taxiDialogPadding / 2) / devicePixelRatio));

final defaultDialogPadding =
Padding(padding: EdgeInsets.all(taxiDialogPadding / devicePixelRatio));

final defaultDialogButtonSize = Size(147.50, 35);

final defaultDialogButtonInnerPadding = EdgeInsets.only(top: 9, bottom: 9);

final defaultDialogButtonBorderRadius = BorderRadius.circular(8.0);

final defaultTaxiMarginDouble = 20.0;

final defaultTaxiMargin =
EdgeInsets.symmetric(horizontal: defaultTaxiMarginDouble);

const defaultNotificationButtonSize = Size(90, 25);
const defaultNotificationButtonInnerPadding =
EdgeInsets.symmetric(horizontal: 15.0, vertical: 2.0);
final defaultNotificationButtonBorderRadius = BorderRadius.circular(30.0);
final defaultNotificatonOutlinedButtonStyle = OutlinedButton.styleFrom(
minimumSize: Size.zero,
fixedSize: defaultNotificationButtonSize,
padding: defaultNotificationButtonInnerPadding,
backgroundColor: taxiPrimaryMaterialColor,
shape: RoundedRectangleBorder(
borderRadius: defaultNotificationButtonBorderRadius,
side: const BorderSide(color: Colors.black),
),
); // TODO: ThemeData에 있는 OutlinedButtonThemeData 분리

ThemeData taxiTheme() {
final base = ThemeData(
primarySwatch: taxiPrimaryMaterialColor,
primaryColor: const Color(0xFF6E3678),

//dialog 테마
dialogTheme: DialogTheme(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
backgroundColor: Colors.white,
actionsPadding: const EdgeInsets.all(10.0),
surfaceTintColor: Colors.black,
),
dialogBackgroundColor: Colors.white,

//dialog 버튼
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
elevation: 0.5,
fixedSize: defaultDialogButtonSize,
padding: defaultDialogButtonInnerPadding,
backgroundColor: const Color.fromARGB(255, 238, 238, 238),
shape: RoundedRectangleBorder(
borderRadius: defaultDialogButtonBorderRadius,
),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
fixedSize: defaultDialogButtonSize,
padding: defaultDialogButtonInnerPadding,
backgroundColor: taxiPrimaryMaterialColor,
shape: RoundedRectangleBorder(
borderRadius: defaultDialogButtonBorderRadius,
side: const BorderSide(color: Colors.black),
),
),
),
bannerTheme: MaterialBannerThemeData(
backgroundColor: Colors.white,
),

//텍스트 테마
textTheme: const TextTheme(
//Dialog 제목
titleSmall: TextStyle(
fontFamily: 'NanumSquare',
color: Color(0xFF323232),
fontSize: 16,
fontWeight: FontWeight.w400),

//Dialog 상세 설명
bodySmall: TextStyle(
fontFamily: 'NanumSquare_acB',
color: Color(0xFF888888),
fontSize: 10,
fontWeight: FontWeight.w700),

//Dialog Outlined 버튼 텍스트
labelLarge: TextStyle(
fontFamily: 'NanumSquare_acB',
color: Color(0xFFEEEEEE),
fontSize: 14,
fontWeight: FontWeight.w700),

//Dialog Elevated 버튼 텍스트
labelMedium: TextStyle(
fontFamily: 'NanumSquare',
color: Color.fromARGB(255, 129, 129, 129),
fontSize: 14,
fontWeight: FontWeight.w400),
labelSmall: TextStyle(
color: Color(0xFFEEEEEE),
fontFamily: 'NanumSquare_acB',
fontSize: 12,
fontWeight: FontWeight.w700,
letterSpacing: 0.4,
),
),

bottomNavigationBarTheme: BottomNavigationBarThemeData(
type: BottomNavigationBarType.fixed,
backgroundColor: Colors.white,
selectedItemColor: Color(0xFF6E3678),
selectedLabelStyle: TextStyle(
fontFamily: 'NanumSquare',
fontSize: 12,
fontWeight: FontWeight.w700,
letterSpacing: 0.4,
),
unselectedLabelStyle: TextStyle(
fontFamily: 'NanumSquare',
fontSize: 12,
fontWeight: FontWeight.w700,
letterSpacing: 0.4,
),
),
);
return base;
}
9 changes: 4 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:taxiapp/utils/token.dart';
import 'package:taxiapp/views/taxiView.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:taxiapp/firebase_options.dart';
import 'constants/theme.dart';

late AndroidNotificationChannel channel;
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
Expand Down Expand Up @@ -82,13 +83,11 @@ class MyHome extends HookWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Taxi App',
theme: ThemeData(
primarySwatch: Colors.blue,
),
theme: taxiTheme(),
home: Container(
color: const Color(0xFF6E3647),
color: Theme.of(context).primaryColor,
child: Container(
color: Colors.white,
color: taxiMainBackgroundColor,
child: TaxiView(),
),
),
Expand Down
Loading

0 comments on commit 88bd040

Please sign in to comment.