Commit 454016dd authored by 汪林玲's avatar 汪林玲

更新

parent 3bfcaf6e
......@@ -340,7 +340,7 @@ class CustomLayoutOption {
final int? stateCount;
CustomLayoutOption({this.stateCount, required this.startIndex})
: assert(startIndex != null, stateCount != null);
: assert(stateCount != null);
CustomLayoutOption addOpacity(List<double> values) {
builders.add(new OpacityTransformBuilder(values: values));
......@@ -380,8 +380,7 @@ class _CustomLayoutSwiper extends _SubSwiper {
int? index,
int? itemCount,
Axis? scrollDirection,
SwiperController? controller})
: assert(option != null),
SwiperController? controller}):
super(
loop: loop,
onIndexChanged: onIndexChanged,
......
......@@ -238,7 +238,7 @@ typedef Widget SwiperPaginationBuilder(
class SwiperCustomPagination extends SwiperPlugin {
final SwiperPaginationBuilder builder;
SwiperCustomPagination({required this.builder}) : assert(builder != null);
SwiperCustomPagination({required this.builder});
@override
Widget build(BuildContext context, SwiperPluginConfig? config) {
......
......@@ -30,9 +30,7 @@ class SwiperPluginConfig {
required this.controller,
this.pageController,
this.layout,
this.loop})
: assert(scrollDirection != null),
assert(controller != null);
this.loop});
}
class SwiperPluginView extends StatelessWidget {
......
.DS_Store
.dart_tool/
.packages
.pub/
build/
ios/.generated/
ios/Flutter/Generated.xcconfig
ios/Runner/GeneratedPluginRegistrant.*
*.log
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/typed_data" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
<CLASSES />
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/flutter_page_indicator.iml" filepath="$PROJECT_DIR$/flutter_page_indicator.iml" />
</modules>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
## [0.0.3]
* Fix bugs
* Support loop mode for layout: PageIndicatorLayout.COLOR & PageIndicatorLayout.COLOR.
* Modify all `PageIndicatorLayout` values to uppercase.
## [0.0.2]
* Update readme
## [0.0.1]
* Basic usage
* PageIndicatorLayout.NONE
* PageIndicatorLayout.SLIDE
* PageIndicatorLayout.WARM
* PageIndicatorLayout.COLOR
* PageIndicatorLayout.SCALE
* PageIndicatorLayout.DROP
<p align="center">
<a href="https://pub.dartlang.org/packages/flutter_page_indicator">
<img src="https://img.shields.io/pub/v/flutter_page_indicator.svg" alt="pub package" />
</a>
</p>
# flutter_page_indicator
Page indicator for flutter, with multiple build-in layouts.
## Show cases
![showcases](https://github.com/jzoom/images/raw/master/page_indicator.gif)
### Installation
Add
```bash
flutter_page_indicator:
```
to your pubspec.yaml ,and run
```bash
flutter packages get
```
in your project's root directory.
### Basic Usage
```
new PageIndicator(
layout: PageIndicatorLayout.SLIDE,
size: 20.0,
controller: YOUR_PAGE_CONTROLLER,
space: 5.0,
count: 4,
)
```
### All build-in layouts
| Layout | Showcase | Support version |
| :------------ |:---------------:|:---------------:|
| PageIndicatorLayout.NONE | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator1.gif) | From 0.0.1 |
| PageIndicatorLayout.SLIDE | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator2.gif) | From 0.0.1 |
| PageIndicatorLayout.WARM | ![](https://raw.githubusercontent.com/jzoom/images/master/warm.gif) | From 0.0.1 |
| PageIndicatorLayout.COLOR | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator4.gif) | From 0.0.1 |
| PageIndicatorLayout.SCALE | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator5.gif) | From 0.0.1 |
| PageIndicatorLayout.DROP | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator7.gif) | From 0.0.1 |
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart Packages" level="project" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
</component>
</module>
\ No newline at end of file
library flutter_page_indicator;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class WarmPainter extends BasePainter {
WarmPainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double distance = size + space;
double start = index * (size + space);
if (progress > 0.5) {
double right = start + size + distance;
//progress=>0.5-1.0
//left:0.0=>distance
double left = index * distance + distance * (progress - 0.5) * 2;
canvas.drawRRect(
new RRect.fromLTRBR(
left, 0.0, right, size, new Radius.circular(radius)),
_paint);
} else {
double right = start + size + distance * progress * 2;
canvas.drawRRect(
new RRect.fromLTRBR(
start, 0.0, right, size, new Radius.circular(radius)),
_paint);
}
}
}
class DropPainter extends BasePainter {
DropPainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
@override
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double dropHeight = widget.dropHeight;
double rate = (0.5 - progress).abs() * 2;
double scale = widget.scale;
//lerp(begin, end, progress)
canvas.drawCircle(
new Offset(radius + ((page) * (size + space)),
radius - dropHeight * (1 - rate)),
radius * (scale + rate * (1.0 - scale)),
_paint);
}
}
class NonePainter extends BasePainter {
NonePainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
@override
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
if (progress > 0.5) {
canvas.drawCircle(
new Offset(secondOffset, radius),
radius,
_paint);
} else {
canvas.drawCircle(new Offset(radius + (index * (size + space)), radius),
radius, _paint);
}
}
}
class SlidePainter extends BasePainter {
SlidePainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
@override
void draw(Canvas canvas, double space, double size, double radius) {
canvas.drawCircle(
new Offset(radius + (page * (size + space)), radius), radius, _paint);
}
}
class ScalePainter extends BasePainter {
ScalePainter(
PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
// 连续的两个点,含有最后一个和第一个
@override
bool _shouldSkip(int i) {
if(index == widget.count-1){
return i==0 || i == index;
}
return (i == index || i == index + 1);
}
@override
void paint(Canvas canvas, Size size) {
_paint.color = widget.color;
double space = widget.space;
double size = widget.size;
double radius = size / 2;
for (int i = 0, c = widget.count; i < c; ++i) {
if (_shouldSkip(i)) {
continue;
}
canvas.drawCircle(new Offset(i * (size + space) + radius, radius),
radius * widget.scale, _paint);
}
_paint.color = widget.activeColor;
draw(canvas, space, size, radius);
}
@override
void draw(Canvas canvas, double space, double size, double radius) {
double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
double progress = page - index;
_paint.color = Color.lerp(widget.activeColor, widget.color, progress)!;
//last
canvas.drawCircle(new Offset(radius + (index * (size + space)), radius),
lerp(radius, radius * widget.scale, progress), _paint);
//first
_paint.color = Color.lerp(widget.color, widget.activeColor, progress)!;
canvas.drawCircle(
new Offset(secondOffset, radius),
lerp(radius * widget.scale, radius, progress),
_paint);
}
}
class ColorPainter extends BasePainter {
ColorPainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
// 连续的两个点,含有最后一个和第一个
@override
bool _shouldSkip(int i) {
if(index == widget.count-1){
return i==0 || i == index;
}
return (i == index || i == index + 1);
}
@override
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
_paint.color = Color.lerp(widget.activeColor, widget.color, progress)!;
//left
canvas.drawCircle(
new Offset(radius + (index * (size + space)), radius), radius, _paint);
//right
_paint.color = Color.lerp(widget.color, widget.activeColor, progress)!;
canvas.drawCircle(
new Offset(secondOffset, radius),
radius,
_paint);
}
}
abstract class BasePainter extends CustomPainter {
final PageIndicator widget;
final double page;
final int index;
final Paint _paint;
double lerp(double begin, double end, double progress) {
return begin + (end - begin) * progress;
}
BasePainter(this.widget, this.page, this.index, this._paint);
void draw(Canvas canvas, double space, double size, double radius);
bool _shouldSkip(int index) {
return false;
}
//double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
@override
void paint(Canvas canvas, Size size) {
_paint.color = widget.color;
double space = widget.space;
double size = widget.size;
double radius = size / 2;
for (int i = 0, c = widget.count; i < c; ++i) {
if (_shouldSkip(i)) {
continue;
}
canvas.drawCircle(
new Offset(i * (size + space) + radius, radius), radius, _paint);
}
double page = this.page;
if (page < index) {
page = 0.0;
}
_paint.color = widget.activeColor;
draw(canvas, space, size, radius);
}
@override
bool shouldRepaint(BasePainter oldDelegate) {
return oldDelegate.page != page;
}
}
class _PageIndicatorState extends State<PageIndicator> {
int index = 0;
Paint _paint = new Paint();
BasePainter _createPainer() {
switch (widget.layout) {
case PageIndicatorLayout.NONE:
return new NonePainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.SLIDE:
return new SlidePainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.WARM:
return new WarmPainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.COLOR:
return new ColorPainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.SCALE:
return new ScalePainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.DROP:
return new DropPainter(
widget, widget.controller.page ?? 0.0, index, _paint);
default:
throw new Exception("Not a valid layout");
}
}
@override
Widget build(BuildContext context) {
Widget child = new SizedBox(
width: widget.count * widget.size + (widget.count - 1) * widget.space,
height: widget.size,
child: new CustomPaint(
painter: _createPainer(),
),
);
if (widget.layout == PageIndicatorLayout.SCALE ||
widget.layout == PageIndicatorLayout.COLOR) {
child = new ClipRect(
child: child,
);
}
return new IgnorePointer(
child: child,
);
}
void _onController() {
double page = widget.controller.page ?? 0.0;
index = page.floor();
setState(() {});
}
@override
void initState() {
widget.controller.addListener(_onController);
super.initState();
}
@override
void didUpdateWidget(PageIndicator oldWidget) {
if(widget.controller != oldWidget.controller){
oldWidget.controller.removeListener(_onController);
widget.controller.addListener(_onController);
}
super.didUpdateWidget(oldWidget);
}
@override
void dispose() {
widget.controller.removeListener(_onController);
super.dispose();
}
}
enum PageIndicatorLayout {
NONE,
SLIDE,
WARM,
COLOR,
SCALE,
DROP,
}
class PageIndicator extends StatefulWidget {
/// size of the dots
final double size;
/// space between dots.
final double space;
/// count of dots
final int count;
/// active color
final Color activeColor;
/// normal color
final Color color;
/// layout of the dots,default is [PageIndicatorLayout.SLIDE]
final PageIndicatorLayout layout;
// Only valid when layout==PageIndicatorLayout.scale
final double scale;
// Only valid when layout==PageIndicatorLayout.drop
final double dropHeight;
final PageController controller;
final double activeSize;
PageIndicator(
{Key? key,
this.size: 20.0,
this.space: 5.0,
required this.count,
this.activeSize : 20.0,
required this.controller,
this.color: Colors.white30,
this.layout: PageIndicatorLayout.SLIDE,
this.activeColor: Colors.white,
this.scale: 0.6,
this.dropHeight: 20.0})
: super(key: key);
@override
State<StatefulWidget> createState() {
return new _PageIndicatorState();
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=0.1.4"
name: flutter_page_indicator
description: Page indicator for flutter, with multiple build-in layouts.
version: 0.0.3
homepage: https://github.com/jzoom/flutter_page_indicator
dependencies:
flutter:
sdk: flutter
environment:
sdk: '>=2.12.0 <3.0.0'
flutter: ">=0.1.4 <3.0.0"
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
.DS_Store
.dart_tool/
.packages
.pub/
build/
ios/.generated/
ios/Flutter/Generated.xcconfig
ios/Runner/GeneratedPluginRegistrant.*
*.log
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/cli" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/indexed_db" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/js" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/js_util" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/svg" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/typed_data" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/web_audio" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/web_gl" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/web_sql" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
<CLASSES />
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/transformer_page_view.iml" filepath="$PROJECT_DIR$/transformer_page_view.iml" />
</modules>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
language: dart
env:
- SHARD=dartfmt
- SHARD=test
install:
- ./dev/bots/travis_install.sh
script:
- ./dev/bots/travis_script.sh
after_success:
- coveralls-lcov coverage/lcov.info
\ No newline at end of file
## [0.1.6] - [2019.03.22]
* Fix setState() called after dispose()
## [0.1.5] - [2019.03.10]
* Fix findRenderObject is null
## [0.1.4] - [2018.10.19]
* Fix display items when itemCount changes
## [0.1.3] - [2018.10.18]
* Fix zero item count
## [0.1.1] - [2018.10.10]
* Fix next/previous index in none loop mode.
## [0.1.0] - [2018.10.08]
* Implement `TransformerPageController`
## [0.0.8] - [2018.09.20]
* Ignore not valid event
## [0.0.7] - [2018.09.20]
* Fix bugs
## [0.0.6] - [2018.09.20]
* Fix bugs
## [0.0.5] - [2018.09.19]
* Fix bugs
## [0.0.4] - [2018.09.19]
* Fix bugs
## [0.0.2] - [2018.08.30]
* Update readme
## [0.0.1] - [2018.08.30]
* Basic animation
<p align="center">
<a href="https://travis-ci.org/best-flutter/transformer_page_view">
<img src="https://travis-ci.org/best-flutter/transformer_page_view.svg?branch=master" alt="Build Status" />
</a>
<a href="https://github.com/best-flutter/transformer_page_view/pulls">
<img src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg" alt="PRs Welcome" />
</a>
<a href="https://pub.dartlang.org/packages/transformer_page_view">
<img src="https://img.shields.io/pub/v/transformer_page_view.svg" alt="pub package" />
</a>
</p>
# transformer_page_view
PageTransformer for flutter
## Very simple to use
```
import 'package:transformer_page_view/transformer_page_view.dart';
...
new TransformerPageView(
loop: true,
transformer: new AccordionTransformer(),
itemBuilder: (BuildContext context, int index) {
return new Container(
color: list[index%list.length],
child: new Center(
child: new Text("$index",style: new TextStyle(fontSize: 80.0,color: Colors.white),),
),
);
},
itemCount: 3)
```
Almost the same as PageView.builder, simplely specify a `transformer` to `TransformerPageView`,
which is a sub class of `PageTransformer`
## Show cases
### Parallax
![Welcome view](https://github.com/jzoom/images/raw/master/welcome.gif)
### Basic
![AccordionTransformer](https://github.com/jzoom/images/raw/master/AccordionTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/AccordionTransformer.dart)
![ThreeDTransformer](https://github.com/jzoom/images/raw/master/ThreeDTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ThreeDTransformer.dart)
![ScaleAndFadeTransformer](https://github.com/jzoom/images/raw/master/ScaleAndFadeTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ScaleAndFadeTransformers.dart)
![ZoomInPageTransformer](https://github.com/jzoom/images/raw/master/ZoomInPageTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ZoomInPageTransformer.dart)
![ZoomOutPageTransformer](https://github.com/jzoom/images/raw/master/ZoomOutPageTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ZoomOutPageTransformer.dart)
![DepthPageTransformer](https://github.com/jzoom/images/raw/master/DepthPageTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/DepthPageTransformers.dart)
## Getting Started
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Build-in Parallax](#build-in-parallax)
- [Custom animation](#custom-animation)
### Installation
Add
```bash
transformer_page_view:
```
to your pubspec.yaml ,and run
```bash
flutter packages get
```
in your project's root directory.
### Basic Usage
| Parameter | Default | Description |
| :------------ |:---------------:| :-----|
| scrollDirection | Axis.horizontal | If `Axis.horizontal`, the scroll view's children are arranged horizontally in a row instead of vertically in a column. |
| loop | false |Set to `true` to enable continuous loop mode. |
| index | none | Index number of initial slide. if not set , it is controlled by the widget itself,otherwise, it is controlled by another widget, which is returned by `itemBuilder`|
| onPageChanged | void onPageChanged(int index) | Called with the new index when the user swiped |
| duration | new Duration(milliseconds:300) | The milliseconds of every transaction animation costs |
| transformer | none | The most important property of this widget, it returns a `transformed` widget that based on the widget parameter. If the value is null, a `itemBuilder` must be specified |
| itemCount | none | Number of the total items |
| itemBuilder | none | A function that returns a widget based on index,if it's null,a `transformer` must be specified |
### Build-in Parallax
We provide 3 build-in parallaxes, which handle color、image and container
> ParallaxColor
ParallaxColor handles the color transform, which controls the color transform from one to another.
> ParallaxImage
ParallaxImage handles the image, which speed is slower than the `PageView`
> ParallaxContainer
ParallaxContainer handles the text or other staff, which speed is faster than the `PageView`
3 build-in parallaxes are all used in subclass of `PageTransform`,group these parallaxes together, we can create very cool things.
![](https://github.com/jzoom/images/raw/master/beauty.gif)
Inspired by [page-transformer](https://github.com/roughike/page-transformer), and we have an easier way to create this.
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/images.dart)
### Custom animation
#!/bin/bash
echo "$PWD"
export ROOT="$PWD"
mkdir ~/development
cd ~/development
wget https://storage.googleapis.com/flutter_infra/releases/beta/linux/flutter_linux_v0.6.0-beta.tar.xz
tar xf ~/development/flutter_linux_v0.6.0-beta.tar.xz
export PATH=~/development/flutter/bin:$PATH
cd $ROOT
flutter packages get
gem install coveralls-lcov
#!/bin/bash
set -ex
export PATH=~/development/flutter/bin:$PATH
export ROOT="$PWD"
if [[ "$SHARD" == "dartfmt" ]]; then
echo 'Formating code'
cd $ROOT
flutter format . || exit $?
else
# tests shard
cd $ROOT
flutter test --coverage test/* || exit $?
fi
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
class IndexController extends ChangeNotifier {
static const int NEXT = 1;
static const int PREVIOUS = -1;
static const int MOVE = 0;
late Completer _completer;
int? index;
late bool animation;
int? event;
Future move(int index, {bool animation: true}) {
this.animation = animation;
this.index = index;
this.event = MOVE;
_completer = new Completer();
notifyListeners();
return _completer.future;
}
Future next({bool animation: true}) {
this.event = NEXT;
this.animation = animation;
_completer = new Completer();
notifyListeners();
return _completer.future;
}
Future previous({bool animation: true}) {
this.event = PREVIOUS;
this.animation = animation;
_completer = new Completer();
notifyListeners();
return _completer.future;
}
void complete() {
if (!_completer.isCompleted) {
_completer.complete();
}
}
}
import 'package:flutter/widgets.dart';
import 'package:transformer_page_view/transformer_page_view.dart';
typedef void PaintCallback(Canvas canvas, Size siz);
class ColorPainter extends CustomPainter {
final Paint _paint;
final TransformInfo info;
final List<Color> colors;
ColorPainter(this._paint, this.info, this.colors);
@override
void paint(Canvas canvas, Size size) {
int index = info.fromIndex!;
_paint.color = colors[index];
canvas.drawRect(
new Rect.fromLTWH(0.0, 0.0, size.width, size.height), _paint);
if (info.done!) {
return;
}
int alpha;
int color;
double opacity;
double? position = info.position;
if (info.forward!) {
if (index < colors.length - 1) {
color = colors[index + 1].value & 0x00ffffff;
opacity = (position! <= 0
? (-position / info.viewportFraction!)
: 1 - position / info.viewportFraction!);
if (opacity > 1) {
opacity -= 1.0;
}
if (opacity < 0) {
opacity += 1.0;
}
alpha = (0xff * opacity).toInt();
_paint.color = new Color((alpha << 24) | color);
canvas.drawRect(
new Rect.fromLTWH(0.0, 0.0, size.width, size.height), _paint);
}
} else {
if (index > 0) {
color = colors[index - 1].value & 0x00ffffff;
opacity = (position! > 0
? position / info.viewportFraction!
: (1 + position / info.viewportFraction!));
if (opacity > 1) {
opacity -= 1.0;
}
if (opacity < 0) {
opacity += 1.0;
}
alpha = (0xff * opacity).toInt();
_paint.color = new Color((alpha << 24) | color);
canvas.drawRect(
new Rect.fromLTWH(0.0, 0.0, size.width, size.height), _paint);
}
}
}
@override
bool shouldRepaint(ColorPainter oldDelegate) {
return oldDelegate.info != info;
}
}
class _ParallaxColorState extends State<ParallaxColor> {
Paint paint = new Paint();
@override
Widget build(BuildContext context) {
return new CustomPaint(
painter: new ColorPainter(paint, widget.info, widget.colors),
child: widget.child,
);
}
}
class ParallaxColor extends StatefulWidget {
final Widget child;
final List<Color> colors;
final TransformInfo info;
ParallaxColor({
required this.colors,
required this.info,
required this.child,
});
@override
State<StatefulWidget> createState() {
return new _ParallaxColorState();
}
}
class ParallaxContainer extends StatelessWidget {
final Widget child;
final double position;
final double translationFactor;
final double opacityFactor;
ParallaxContainer(
{required this.child,
required this.position,
this.translationFactor: 100.0,
this.opacityFactor: 1.0});
@override
Widget build(BuildContext context) {
return Opacity(
opacity: (1 - position.abs()).clamp(0.0, 1.0) * opacityFactor,
child: new Transform.translate(
offset: new Offset(position * translationFactor, 0.0),
child: child,
),
);
}
}
class ParallaxImage extends StatelessWidget {
final Image image;
final double imageFactor;
ParallaxImage.asset(String name, {required double position, this.imageFactor: 0.3})
: image = Image.asset(name,
fit: BoxFit.cover,
alignment: FractionalOffset(
0.5 + position * imageFactor,
0.5,
));
@override
Widget build(BuildContext context) {
return image;
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
file:
dependency: transitive
description:
name: file
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.1.2"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_driver:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
process:
dependency: transitive
description:
name: process
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.2.3"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
sync_http:
dependency: transitive
description:
name: sync_http
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
vm_service:
dependency: transitive
description:
name: vm_service
url: "https://pub.flutter-io.cn"
source: hosted
version: "7.1.1"
webdriver:
dependency: transitive
description:
name: webdriver
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
sdks:
dart: ">=2.12.0 <3.0.0"
name: transformer_page_view
description: PageTransformer for flutter
version: 0.1.6
homepage: https://github.com/jzoom/transformer_page_view
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
flutter_driver:
sdk: flutter
flutter:
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:transformer_page_view/transformer_page_view.dart';
void main() {
testWidgets('TransformerPageView basic usage', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 10)));
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
testWidgets('Zero item count ', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
transformer: new PageTransformerBuilder(
builder: (Widget child, TransformInfo info) {
return new Container(
child: new Text("0"),
);
}),
itemCount: 0)));
expect(find.text("0", skipOffstage: false), findsNothing);
});
testWidgets('TransformerPageView transformer only',
(WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
transformer: new PageTransformerBuilder(
builder: (Widget child, TransformInfo info) {
return new Container(
child: new Text("0"),
);
}),
itemCount: 10)));
// expect(find.text("0", skipOffstage: false), findsOneWidget);
});
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ScaleAndFadeTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new AccordionTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ZoomInPageTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ZoomOutPageTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ThreeDTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new DeepthPageTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
testWidgets('TransformerPageView controller', (WidgetTester tester) async {
// Build our app and trigger a frame.
IndexController controller = new IndexController();
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
controller: controller,
transformer: new FackTransformer(),
itemBuilder: (context, index) {
print("===================build:$index");
return Text("$index");
},
itemCount: 10)));
expect(find.text("0"), findsOneWidget);
await controller.next(animation: false);
expect(find.text("0"), findsOneWidget);
await controller.previous(animation: false);
expect(find.text("0"), findsOneWidget);
await controller.move(2, animation: false);
expect(find.text("0"), findsOneWidget);
});
}
class FackTransformer extends PageTransformer {
@override
Widget transform(Widget child, TransformInfo info) {
return child;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
\ No newline at end of file
......@@ -58,9 +58,11 @@ packages:
flutter_page_indicator:
dependency: "direct main"
description:
path: "package/flutter_page_indicator"
relative: true
source: path
path: "."
ref: HEAD
resolved-ref: "6812decd361038f5ac8afe1de69f5ab12de0e2e5"
url: "git@git.xiaomanxiong.com:flutter-plugin/flutter_page_indicator.git"
source: git
version: "0.0.3"
flutter_test:
dependency: "direct dev"
......@@ -138,9 +140,11 @@ packages:
transformer_page_view:
dependency: "direct main"
description:
path: "package/transformer_page_view"
relative: true
source: path
path: "."
ref: HEAD
resolved-ref: f04b1b9ec098707ab63864aba868fe515decfe3c
url: "git@git.xiaomanxiong.com:flutter-plugin/transformer_page_view.git"
source: git
version: "0.1.6"
typed_data:
dependency: transitive
......
......@@ -10,9 +10,9 @@ dependencies:
sdk: flutter
transformer_page_view:
path: ./package/transformer_page_view
git: git@git.xiaomanxiong.com:flutter-plugin/transformer_page_view.git
flutter_page_indicator:
path: ./package/flutter_page_indicator
git: git@git.xiaomanxiong.com:flutter-plugin/flutter_page_indicator.git
environment:
sdk: '>=2.12.0 <3.0.0'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment