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
138 changes: 97 additions & 41 deletions packages/flutter_onboarding_slider/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ packages:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
clock:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.19.1"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -53,10 +53,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.3"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -77,19 +77,59 @@ packages:
relative: true
source: path
version: "1.0.11"
flutter_riverpod:
dependency: transitive
description:
name: flutter_riverpod
sha256: "9532ee6db4a943a1ed8383072a2e3eeda041db5657cdf6d2acecf3c21ecbe7e1"
url: "https://pub.dev"
source: hosted
version: "2.6.1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
js:
freezed_annotation:
dependency: transitive
description:
name: freezed_annotation
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2
url: "https://pub.dev"
source: hosted
version: "2.4.4"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
version: "0.6.7"
version: "3.0.2"
lints:
dependency: transitive
description:
Expand All @@ -102,55 +142,55 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
source: hosted
version: "1.9.1"
nested:
version: "1.16.0"
path:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
path:
version: "1.9.1"
riverpod:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
name: riverpod
sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
provider:
version: "2.6.1"
riverpod_annotation:
dependency: transitive
description:
name: provider
sha256: dc18c7bddb94a1eb3c3154587d16175a657356c80566712e6cd8ca4825eae112
name: riverpod_annotation
sha256: e14b0bf45b71326654e2705d462f21b958f987087be850afd60578fcd502d1b8
url: "https://pub.dev"
source: hosted
version: "6.0.1"
version: "2.6.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
Expand All @@ -163,18 +203,26 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
state_notifier:
dependency: transitive
description:
name: state_notifier
sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.0.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.4"
string_scanner:
dependency: transitive
description:
Expand All @@ -195,18 +243,26 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.7.6"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.2.0"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60"
url: "https://pub.dev"
source: hosted
version: "15.0.2"
sdks:
dart: ">=3.0.0-0 <4.0.0"
flutter: ">=1.17.0"
dart: ">=3.8.0-0 <4.0.0"
flutter: ">=3.22.0"
2 changes: 1 addition & 1 deletion packages/flutter_onboarding_slider/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: '>=2.18.6 <3.0.0'
sdk: '>=3.4.0 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down
23 changes: 15 additions & 8 deletions packages/flutter_onboarding_slider/lib/background.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_onboarding_slider/background_image.dart';

import 'background_image.dart';

class Background extends StatelessWidget {
final Widget child;
Expand All @@ -9,15 +11,18 @@ class Background extends StatelessWidget {
final double imageVerticalOffset;
final double imageHorizontalOffset;
final bool centerBackground;
final PageController pageController;

Background({
const Background({
super.key,
required this.imageVerticalOffset,
required this.child,
required this.centerBackground,
required this.totalPage,
required this.background,
required this.speed,
required this.imageHorizontalOffset,
required this.pageController,
});

@override
Expand All @@ -27,12 +32,14 @@ class Background extends StatelessWidget {
children: [
for (int i = 0; i < totalPage; i++)
BackgroundImage(
centerBackground: centerBackground,
imageHorizontalOffset: imageHorizontalOffset,
imageVerticalOffset: imageVerticalOffset,
id: totalPage - i,
speed: speed,
background: background[totalPage - i - 1]),
centerBackground: centerBackground,
imageHorizontalOffset: imageHorizontalOffset,
imageVerticalOffset: imageVerticalOffset,
id: totalPage - i,
speed: speed,
background: background[totalPage - i - 1],
pageController: pageController,
),
child,
],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class BackgroundBody extends StatelessWidget {
final int totalPage;
final List<Widget> bodies;

BackgroundBody({
const BackgroundBody({
super.key,
required this.controller,
required this.function,
required this.totalPage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@ class BackgroundController extends StatelessWidget {
final bool indicatorAbove;
final double indicatorPosition;
final bool hasFloatingButton;
final Color backgroundColor;

BackgroundController({
const BackgroundController({
super.key,
required this.currentPage,
required this.totalPage,
required this.controllerColor,
required this.indicatorAbove,
required this.hasFloatingButton,
required this.indicatorPosition,
required this.backgroundColor,
});

@override
Widget build(BuildContext context) {
return indicatorAbove
? Container(
color: backgroundColor,
padding: EdgeInsets.only(bottom: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
Expand All @@ -30,6 +34,7 @@ class BackgroundController extends StatelessWidget {
: (currentPage == totalPage - 1) && hasFloatingButton
? SizedBox.shrink()
: Container(
color: backgroundColor,
padding: EdgeInsets.only(bottom: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down Expand Up @@ -62,7 +67,7 @@ class BackgroundController extends StatelessWidget {
decoration: BoxDecoration(
color: isActive
? controllerColor ?? Colors.white
: (controllerColor ?? Colors.white).withOpacity(0.5),
: (controllerColor ?? Colors.white).withValues(alpha: .5),
borderRadius: BorderRadius.all(Radius.circular(12)),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class BackgroundFinalButton extends StatelessWidget {
final Icon skipIcon;
final FinishButtonStyle? finishButtonStyle;

BackgroundFinalButton({
const BackgroundFinalButton({
super.key,
required this.currentPage,
required this.pageController,
required this.totalPage,
Expand Down
Loading