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 React from 'react'; | |
import { StyleSheet, Text, View, FlatList, TouchableOpacity, AlertIOS, Platform } from 'react-native'; | |
import { Icon, Button } from 'react-native-elements'; | |
import prompt from 'react-native-prompt-android'; | |
class FinalProject extends React.Component { | |
constructor(props) { | |
super(props); |
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 io.flutter.app.FlutterActivity; | |
import io.flutter.plugin.common.MethodCall; | |
import io.flutter.plugin.common.MethodChannel; | |
import io.flutter.plugin.common.MethodChannel.MethodCallHandler; | |
import io.flutter.plugin.common.MethodChannel.Result; | |
import com.uxcam.UXCam; // Make sure you have this import | |
public class MainActivity extends FlutterActivity { | |
// The methodChannel object name created in the UXCam file |
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 <Flutter/Flutter.h> | |
#import "GeneratedPluginRegistrant.h" | |
#import <UXCam/UXCam.h> // Don't forget to import | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { | |
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController; | |
FlutterMethodChannel* uxcamChannel = [FlutterMethodChannel | |
methodChannelWithName:@"com.ur.app/uxcam" // Your methodChannel name |
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
class RestaurantBloc implements BlocBase { | |
RestaurantBloc() { | |
chef.stream.listen(cookOrder); | |
} | |
String currentOrder; | |
final waiter = StreamController(); | |
Sink get tray => waiter.sink; | |
Stream get deliverFood => waiter.stream; |
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
class RestaurantBloc { | |
RestaurantBloc() { | |
chef.stream.listen(cookOrder); | |
} | |
String cookedFood; | |
final waiter = StreamController(); | |
Sink get tray => waiter.sink; | |
Stream get deliverFood => waiter.stream; |
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:firebase/firebase.dart' as Firebase; | |
Future<void> main() async { | |
if (Firebase.apps.isEmpty) { | |
print(Firebase.apps); | |
Firebase.initializeApp( | |
apiKey: '', | |
authDomain: '', | |
databaseURL: '', | |
projectId: '', |
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
firestore.collection('names').add({'text': 'happyharis'}); // create | |
firestore.collection('names').doc('111').get(); // read | |
firestore.collection('names').doc('111').update(data:{'text': 'thehappyharis'}); // update | |
firestore.collection('names').doc('111').delete(); // delete |
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
NeumorphicBar( | |
width: 200, | |
height: 400, | |
value: 0.9, | |
text: 'Tue', | |
color: Color.fromRGBO(0, 200, 156, 1), | |
), | |
class NeumorphicBar extends StatelessWidget { | |
const NeumorphicBar({ |
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
void main() { | |
Provider.debugCheckInvalidValueType = null; | |
runApp(MyAppExample()); | |
} | |
class MyAppExample extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: MultiProvider(providers: [ |
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'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |