This file contains hidden or 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:mqtt_client/mqtt_client.dart'; | |
| import 'package:mqtt_client/mqtt_server_client.dart'; | |
| import 'dart:async'; | |
| final StreamController<Map<String, String>> mqttMessageController = StreamController<Map<String, String>>.broadcast(); | |
| Future<void> connectAndSubscribeToMQTT() async { | |
| const String broker = ''; |
This file contains hidden or 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
| style={[styles.input, { borderColor: color, backgroundColor: '#f8f8f8' }]} |
This file contains hidden or 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
| mport React, { useEffect,useState } from 'react'; | |
| import { useDispatch, useSelector } from 'react-redux' | |
| import axios from 'axios' | |
| const Testing = () => { | |
| const [value,setValue] = useState('') | |
| const dispatch = useDispatch(); | |
| const users = useSelector(state => state.userReducers.data); | |
| useEffect(() => { | |
| axios | |
| .get('https://jsonplaceholder.typicode.com/users/') |
This file contains hidden or 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, {Component, PureComponent} from 'react'; | |
| import { View, Text, Dimensions, StyleSheet } from 'react-native'; | |
| import NetInfo from '@react-native-community/netinfo'; | |
| const { width } = Dimensions.get('window'); | |
| function MiniOfflineSign() { | |
| return ( | |
| <View style={styles.offlineContainer}> | |
| <Text style={styles.offlineText}>No Internet Connection</Text> |
This file contains hidden or 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, { useState } from 'react' | |
| import { ActivityIndicator, View, StyleSheet } from 'react-native' | |
| import { WebView } from 'react-native-webview' | |
| const styles = StyleSheet.create({ | |
| WebViewStyle: { | |
| justifyContent: 'center', | |
| alignItems: 'center', | |
| flex: 1, | |
| marginTop: 40 | |
| }, |
This file contains hidden or 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
| /*-----------------APPLE---------------------- */ | |
| /* ----------- iPhone 4 and 4S ----------- */ | |
| /* Portrait and Landscape */ | |
| @media only screen | |
| and (min-device-width: 320px) | |
| and (max-device-width: 480px) | |
| and (-webkit-min-device-pixel-ratio: 2) { |
This file contains hidden or 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
| const defaultNavigationOptions = { | |
| headerStyle: { backgroundColor: '#239abb', borderBottomWidth: 0 }, | |
| headerTintColor: '#fff', | |
| headerBackTitle: null, | |
| }; | |
| class BadgeNotification extends PureComponent { | |
| render() { | |
| return ( |
This file contains hidden or 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 ReactDOM from 'react-dom' | |
| import './index.css' | |
| import App from './App' | |
| import { createStore, combineReducers } from 'redux' | |
| import { Provider } from 'react-redux' | |
| import * as serviceWorker from './serviceWorker' | |
| import languageReducer from './store/languageReducer' | |
| const store = createStore( |
This file contains hidden or 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
| 'use strict'; | |
| const bcrypt = require('bcrypt'); | |
| module.exports = (sequelize, DataTypes) => { | |
| const User = sequelize.define('User', { | |
| firstname: DataTypes.STRING, | |
| lastname: DataTypes.STRING, | |
| email:{ | |
| type:DataTypes.STRING, | |
| validate:{ | |
| isEmail:true |
NewerOlder