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
upload_dsym_to_firebase() | |
{ | |
echo "-> Uploading dSYMs files to Google Crashlytics" | |
if [ "$1" == "beta" ] | |
then | |
fastlane upload_crashlytics_beta | |
elif [ "$1" == "prod" ] | |
then | |
fastlane upload_crashlytics_prod | |
fi |
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
struct Device { | |
// iDevice detection code | |
static let IS_IPAD = UIDevice.current.userInterfaceIdiom == .pad | |
static let IS_IPHONE = UIDevice.current.userInterfaceIdiom == .phone | |
static let IS_RETINA = UIScreen.main.scale >= 2.0 | |
static let SCREEN_WIDTH = Int(UIScreen.main.bounds.size.width) | |
static let SCREEN_HEIGHT = Int(UIScreen.main.bounds.size.height) | |
static let SCREEN_MAX_LENGTH = Int( max(SCREEN_WIDTH, SCREEN_HEIGHT) ) | |
static let SCREEN_MIN_LENGTH = Int( min(SCREEN_WIDTH, SCREEN_HEIGHT) ) |
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
import 'package:flutter/material.dart'; | |
import 'package:states_bloc/drawer_menu.dart'; | |
import 'package:states_bloc/bloc/settings/settings_bloc.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
class Settings extends StatelessWidget { | |
double _value = 0.5; | |
bool isBold = false; | |
bool isItalic = false; | |
@override |
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
import 'package:flutter/material.dart'; | |
import 'package:states_bloc/home.dart'; | |
import 'package:states_bloc/about.dart'; | |
import 'package:states_bloc/settings.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:states_bloc/bloc/settings/settings_bloc.dart'; | |
void main() { | |
final BlocProvider<SettingsBloc> blocProvider = BlocProvider<SettingsBloc>( | |
builder: (_) => SettingsBloc(), |
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
import 'dart:async'; | |
import 'package:bloc/bloc.dart'; | |
import 'package:meta/meta.dart'; | |
part 'settings_event.dart'; | |
part 'settings_state.dart'; | |
class SettingsBloc extends Bloc<SettingsEvent, SettingsState> { | |
@override | |
SettingsState get initialState => InitialSettingsState(); |
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
part of 'settings_bloc.dart'; | |
@immutable | |
abstract class SettingsState { | |
final double sliderFontSize; | |
final bool isBold; | |
final bool isItalic; | |
SettingsState({this.sliderFontSize, this.isBold, this.isItalic}); | |
double get fontSize => sliderFontSize * 30; | |
} |
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
part of 'settings_bloc.dart'; | |
@immutable | |
abstract class SettingsEvent { | |
final dynamic payload; | |
SettingsEvent(this.payload); | |
} | |
class FontSize extends SettingsEvent { | |
FontSize(double payload) : super(payload); |
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
import SwiftUI | |
//MARK:- Checkbox Field | |
struct CheckboxField: View { | |
let id: String | |
let label: String | |
let size: CGFloat | |
let color: Color | |
let textSize: Int | |
let callback: (String, Bool)->() |
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
// MARK:- View 2 | |
struct View2: View { | |
@EnvironmentObject var appState: AppState | |
var body: some View { | |
VStack { | |
Text("View 2") | |
.font(.headline) | |
Button(action: { | |
// FIXME:- add move to dashboard functionality |
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
import SwiftUI | |
struct ContentView: View { | |
@EnvironmentObject var appState: AppState | |
var body: some View { | |
NavigationView { | |
VStack { | |
// TabView1() | |
tabsView |
NewerOlder