Skip to content

Instantly share code, notes, and snippets.

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('RichText Widget Demo'),
),
body: Center(
child: ListView(
padding: const EdgeInsets.all(20.0),
children: <Widget>[
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('RichText Widget Demo'),
),
body: Center(
child: ListView(
padding: const EdgeInsets.all(20.0),
children: <Widget>[
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('RichText Widget Demo'),
),
body: Center(
child: ListView(
padding: const EdgeInsets.all(20.0),
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
initialRoute: '/',
routes: {
'/': (BuildContext context) => HomePage(),
'/page1': (BuildContext context) => Page1(),
'/page4': (BuildContext context) => Page4(),
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
);
child: RaisedButton(
child: Text('go to first tab'),
onPressed: () {
_tabController.animateTo(0, curve: Curves.ease, duration: Duration(seconds: 2));
},
),