Skip to content

Commit

Permalink
use carousel pro
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn committed Oct 16, 2018
1 parent 5d25b36 commit 2aa49df
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lib/carousel_pro/carousel_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
import 'package:carousel_pro/carousel_pro.dart';

class CarouselPage extends StatefulWidget {

@override
State createState() => _CarouselPageState();
}

class _CarouselPageState extends State<CarouselPage> {

@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Center(
child: new SizedBox(
height: 150.0,
width: 300.0,
child: new Carousel(
images: [
new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*GqdzzfB_BHorv7V2NV7Jgg.jpeg'),
new NetworkImage('https://cdn-images-1.medium.com/max/2000/1*wnIEgP1gNMrK5gZU7QS0-A.jpeg'),
// new ExactAssetImage("assets/images/LaunchImage.jpg")
],
)
),
),
);
}
}
2 changes: 2 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class _MainApp extends State<MainApp> {
_buildRow("Rating Star", "/rating"),
_buildRow("Appbar bottom Widget", "/appbar"),
_buildRow("Welcome page", "/welcome"),
_buildRow("Test", "/tes"),
_buildRow("Carousel Pro", "/carouselpro"),
],
);
}
Expand Down
4 changes: 4 additions & 0 deletions lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import 'splashlogo/splash_logo.dart';
import 'rating/ratingpage.dart';
import 'appbarbottom/appbar_bottom_widget.dart';
import 'welcome/welcome.dart';
import 'test/tes.dart';
import 'carousel_pro/carousel_page.dart';

final routes = {
"/autocomplete": (BuildContext context) => AutocompleteApp(),
Expand All @@ -18,5 +20,7 @@ final routes = {
"/splash": (BuildContext context) => LogoApp(),
"/appbar": (BuildContext context) => AppBarBottomSample(),
"/welcome": (BuildContext context) => WelcomeScreen(),
"/tes": (BuildContext context) => MyApp(),
"/carouselpro": (BuildContext context) => CarouselPage(),

};
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies:
intl: ^0.15.7
http: ^0.11.3+17
json_annotation: "^0.2.9"
carousel_pro: ^0.0.13

dev_dependencies:
# flutter_test:
Expand Down

0 comments on commit 2aa49df

Please sign in to comment.