Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.32.7"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
.dart_tool/
.packages
build/

# FVM Version Cache
.fvm/
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.32.7",
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#e8885f",
"titleBar.activeForeground": "#000000",
"titleBar.inactiveBackground": "#e8885f",
"titleBar.inactiveForeground": "#000000",
"titleBar.border": "#e8885f",
"activityBar.background": "#e8885f",
"activityBar.foreground": "#000000",
"statusBar.background": "#e8885f",
"statusBar.foreground": "#000000",
"statusBar.debuggingBackground": "#e8885f",
"statusBar.debuggingForeground": "#000000",
"tab.activeBorder": "#e8885f",
"iLoveWorkSpaceColors": true,
"iLoveWorkSpaceRandom": false
}
}
26 changes: 26 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Agent Guidelines for Wave Linear Progress Indicator

## Build/Test/Lint Commands
- **Test all**: `flutter test`
- **Test single file**: `flutter test test/wave_linear_progress_indicator_test.dart`
- **Lint**: `flutter analyze`
- **Format**: `dart format .`
- **Get dependencies**: `flutter pub get`

## Code Style Guidelines
- **Language**: Dart/Flutter package following flutter_lints rules
- **Imports**: Use relative imports for local files, package imports for external dependencies
- **Naming**: camelCase for variables/methods, PascalCase for classes, snake_case for files
- **Types**: Use explicit types for public APIs, prefer `final` over `var`
- **Documentation**: Use /// for public APIs, include parameter descriptions
- **Error handling**: Use proper exception types, avoid silent failures
- **File structure**: Export public APIs through main library file, keep implementation in src/
- **Animation**: Use AnimationController with TickerProviderStateMixin for custom animations
- **Widget structure**: Extend appropriate base classes (ProgressIndicator), use const constructors
- **Comments**: Include file headers with creation date and author when creating new files

## Project Structure
- Main library: `lib/wave_linear_progress_indicator.dart` (exports only)
- Implementation: `lib/src/` directory
- Tests: `test/` directory
- Uses flutter_lints for code analysis
25 changes: 14 additions & 11 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
builder: (context, child) {
return Directionality(textDirection: TextDirection.rtl, child: child!);
},
home:
const MyHomePage(title: 'WaveLinearProgressIndicator Demo Home Page'),
);
}
}

class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);

final String title;

const MyHomePage({Key? key, required this.title}) : super(key: key);

@override
State<MyHomePage> createState() => _MyHomePageState();
}
Expand Down Expand Up @@ -114,6 +117,15 @@ class _MyHomePageState extends State<MyHomePage> {
);
}

void _decrease() {
final delta = Random().nextDouble();
double newValue = _progress - delta;
newValue = newValue.clamp(0, 1);
setState(() {
_progress = newValue;
});
}

Stream<double> _getDownloadProgress() async* {
final values = <double>[
0,
Expand Down Expand Up @@ -143,13 +155,4 @@ class _MyHomePageState extends State<MyHomePage> {
_progress = newValue;
});
}

void _decrease() {
final delta = Random().nextDouble();
double newValue = _progress - delta;
newValue = newValue.clamp(0, 1);
setState(() {
_progress = newValue;
});
}
}
146 changes: 92 additions & 54 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,58 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.8.2"
version: "2.13.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.2"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
version: "1.4.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.19.1"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.flutter-io.cn"
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.0.8"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.3"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -66,110 +66,148 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
url: "https://pub.flutter-io.cn"
sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
url: "https://pub.dev"
source: hosted
version: "1.0.4"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
url: "https://pub.dev"
source: hosted
version: "10.0.9"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.9"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
lints:
dependency: transitive
description:
name: lints
url: "https://pub.flutter-io.cn"
sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
url: "https://pub.dev"
source: hosted
version: "1.0.1"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.11"
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.flutter-io.cn"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.1.3"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
source: hosted
version: "1.7.0"
version: "1.16.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.flutter-io.cn"
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.dev"
source: hosted
version: "1.8.1"
version: "1.10.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.4"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.4.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.2"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
url: "https://pub.dev"
source: hosted
version: "0.4.8"
typed_data:
version: "0.7.4"
vector_math:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
vector_math:
version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
name: vm_service
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "15.0.0"
wave_linear_progress_indicator:
dependency: "direct main"
description:
Expand All @@ -178,5 +216,5 @@ packages:
source: path
version: "0.1.0"
sdks:
dart: ">=2.16.2 <3.0.0"
flutter: ">=1.17.0"
dart: ">=3.7.0-0 <4.0.0"
flutter: ">=3.32.0"
Loading