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
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
drawer: Drawer( | |
child: ListView( | |
// Important: Remove any padding from the ListView. | |
padding: EdgeInsets.zero, |
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
flutter create drawer_app | |
cd drawer_app | |
flutter run |
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 MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Drawer menu by Asapdevelopers', | |
theme: ThemeData( | |
primarySwatch: Colors.red, | |
visualDensity: VisualDensity.adaptivePlatformDensity, | |
), |
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
npx react-codemod React-PropTypes-to-prop-types src/ |
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 { Animated, Text, View } from 'react-native'; | |
class FadeInView extends React.Component { | |
state = { | |
fadeAnim: new Animated.Value(0), // Initial value for opacity: 0 | |
} | |
componentDidMount() { | |
Animated.timing( // Animate over time |
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
<View style={styles.container}> | |
<Text style={[styles.title, this.props.isActive && styles.activeTitle]} /> | |
</View> |
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
const styles = StyleSheet.create({ | |
container: { | |
borderRadius: 4, | |
borderWidth: 0.5, | |
borderColor: '#d6d7da', | |
}, | |
title: { | |
fontSize: 19, | |
fontWeight: 'bold', | |
}, |
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, { Component } from 'react'; | |
import { View, Text } from 'react-native'; | |
export default class App extends Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.hello}>Hello world!</Text> | |
</View> | |
); |
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 gql from "graphql-tag"; | |
import { Mutation } from "react-apollo"; | |
const ADD_FILM = gql` | |
mutation addFilm($title: String!, $episodeId: Int!) { | |
addFilm(title: $title, episodeId, $episodeId) { | |
eposideId | |
} | |
} | |
`; |
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 gql from "graphql-tag"; | |
const query = gql`{ | |
allFilms { | |
films { | |
title | |
episodeID | |
director | |
} | |
} |
NewerOlder