Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added dart code highlighter #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ flutter create myapp

Edit lib/main.dart like this:

```
```dart

import 'package:flutter/material.dart';

Expand Down Expand Up @@ -201,7 +201,7 @@ The pagination extends from `SwiperPlugin`,the `SwiperPlugin` provides extra ui

If you'd like to customize your own pagination, you can do like this:

```
```dart
new Swiper(
...,
pagination:new SwiperCustomPagination(
Expand Down Expand Up @@ -254,7 +254,7 @@ The `Controller` is used to control the `index` of the Swiper, start or stop aut
## Build in layouts
![](https://github.com/jzoom/images/raw/master/layout1.gif)

```
```dart
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
Expand All @@ -273,7 +273,7 @@ new Swiper(

![](https://github.com/jzoom/images/raw/master/layout2.gif)

```
```dart
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
Expand All @@ -289,7 +289,7 @@ new Swiper(

![](https://github.com/jzoom/images/raw/master/layout3.gif)

```
```dart
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
Expand All @@ -308,7 +308,7 @@ new Swiper(
![](https://github.com/jzoom/images/raw/master/layout4.gif)

Very easy to create you own custom animation:
```
```dart

new Swiper(
layout: SwiperLayout.CUSTOM,
Expand Down Expand Up @@ -341,7 +341,7 @@ Very easy to create you own custom animation:
The `CustomLayoutOption` is designed to describe animations.
It is very easy to specify every state of items in Swiper.

```
```dart
new CustomLayoutOption(
startIndex: -1, /// Which index is the first item of array below
stateCount: 3 /// array length
Expand All @@ -361,7 +361,7 @@ new CustomLayoutOption(

![Example](https://github.com/jzoom/images/raw/master/swiper-example.gif)

```
```dart
new ConstrainedBox(
child: new Swiper(
outer:false,
Expand Down