diff --git a/example/lib/main.dart b/example/lib/main.dart index 95f1a89..6d47364 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -3,27 +3,14 @@ import 'package:flutter/material.dart'; import 'package:swipeable_cards_stack/swipeable_cards_stack.dart'; void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } + runApp(const MaterialApp( + title: 'Flutter Demo', + home: const MyHomePage(), + )); } class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key, required this.title}) : super(key: key); - final String title; + const MyHomePage({Key? key}) : super(key: key); @override State createState() => _MyHomePageState(); @@ -36,9 +23,6 @@ class _MyHomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), body: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -68,8 +52,6 @@ class _MyHomePageState extends State { debugPrint('onDown ${(widget as CardView).text} $index'); } }, - enableSwipeUp: true, - enableSwipeDown: true, ), Container( margin: const EdgeInsets.symmetric(vertical: 20.0),