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
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
// 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
var window: UIWindow? | |
var contentView: ContentView? | |
var appState: AppState? | |
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
if let windowScene = scene as? UIWindowScene { | |
let window = UIWindow(windowScene: windowScene) | |
self.window = window | |
reloadDashboard() | |
} |
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 | |
import Combine | |
class AppState: ObservableObject { | |
func reloadDashboard() { | |
(UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate)?.reloadDashboard() | |
} | |
} |
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