Guest User

Untitled

a guest
May 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(LimeApp());
  4.  
  5. class LimeApp extends StatelessWidget {
  6. @override
  7. Widget build(BuildContext context) {
  8. return MaterialApp(
  9. title: 'Lime',
  10. home: MainPage(),
  11. );
  12. }
  13. }
  14.  
  15. class MainPage extends StatelessWidget {
  16. @override
  17. Widget build(BuildContext context) {
  18. return Scaffold(
  19. body: Container(
  20. margin: EdgeInsets.symmetric(
  21. vertical: 50.0,
  22. ),
  23. child: PageView(
  24. controller: PageController(
  25. initialPage: 1,
  26. viewportFraction: 0.8,
  27. ),
  28. children: [
  29. Container(margin: EdgeInsets.symmetric(horizontal: 10.0,), color: Colors.redAccent),
  30. Container(margin: EdgeInsets.symmetric(horizontal: 10.0,), color: Colors.purpleAccent),
  31. Container(margin: EdgeInsets.symmetric(horizontal: 10.0,), color: Colors.greenAccent)
  32. ],
  33. ),
  34. ),
  35. );
  36. }
  37. }
Add Comment
Please, Sign In to add comment