Guest User

Untitled

a guest
May 20th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 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. theme: ThemeData(
  11. canvasColor: Colors.primaries[6],
  12. ),
  13. home: MainPage(),
  14. );
  15. }
  16. }
  17.  
  18. class MainPage extends StatelessWidget {
  19. @override
  20. Widget build(BuildContext context) {
  21. return Scaffold(
  22. body: Container(
  23. decoration: BoxDecoration(
  24. color: Colors.black54,
  25. ),
  26. margin: EdgeInsets.symmetric(
  27. vertical: 50.0,
  28. horizontal: 10.0,
  29. ),
  30. child: PageView(
  31. controller: PageController(
  32. initialPage: 1,
  33. viewportFraction: 0.8,
  34. ),
  35. children: [
  36. Container(color: Colors.redAccent),
  37. Container(color: Colors.purpleAccent),
  38. Container(color: Colors.greenAccent)
  39. ],
  40. ),
  41. ),
  42. );
  43. }
  44. }
Add Comment
Please, Sign In to add comment