Skip to content

Instantly share code, notes, and snippets.

View flutter_2
@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,
View flutter_0
flutter create drawer_app
cd drawer_app
flutter run
View flutter_1
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,
),
View React-PropTypes-to-prop-type
npx react-codemod React-PropTypes-to-prop-types src/
View react_react_native_4.jsx
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
View react_react_native_3.jsx
<View style={styles.container}>
<Text style={[styles.title, this.props.isActive && styles.activeTitle]} />
</View>
View react_react_native_2.js
const styles = StyleSheet.create({
container: {
borderRadius: 4,
borderWidth: 0.5,
borderColor: '#d6d7da',
},
title: {
fontSize: 19,
fontWeight: 'bold',
},
View react_react_native_1.jsx
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>
);
View apollo_tutorial_6.jsx
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
}
}
`;
View apollo_tutorial_5.jsx
import gql from "graphql-tag";
const query = gql`{
allFilms {
films {
title
episodeID
director
}
}