mirror of
https://github.com/Iconica-Development/flutter_introduction.git
synced 2025-05-19 12:03:44 +02:00
Compare commits
No commits in common. "master" and "3.1.0" have entirely different histories.
32 changed files with 153 additions and 189 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -31,6 +31,7 @@ build/
|
||||||
|
|
||||||
.metadata
|
.metadata
|
||||||
|
|
||||||
|
|
||||||
pubspec.lock
|
pubspec.lock
|
||||||
|
|
||||||
pubspec_overrides.yaml
|
pubspec_overrides.yaml
|
||||||
|
@ -40,7 +41,3 @@ example/web
|
||||||
example/android
|
example/android
|
||||||
example/linux
|
example/linux
|
||||||
example/macos
|
example/macos
|
||||||
|
|
||||||
# FVM Version Cache
|
|
||||||
.fvm/
|
|
||||||
.fvmrc
|
|
||||||
|
|
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -1,14 +1,3 @@
|
||||||
## 5.0.0
|
|
||||||
|
|
||||||
* Changed color of indicators
|
|
||||||
* Changed default button text
|
|
||||||
|
|
||||||
## 4.0.0
|
|
||||||
|
|
||||||
* Added Buildcontext to the pages parameter.
|
|
||||||
* Added `dotColor` so the default can be changed.
|
|
||||||
* Changed the default `pages` to include theme.
|
|
||||||
|
|
||||||
## 3.1.0
|
## 3.1.0
|
||||||
|
|
||||||
* Introduction now uses `IntroductionScreenMode` to determine how often the introductions should be shown
|
* Introduction now uses `IntroductionScreenMode` to determine how often the introductions should be shown
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -38,7 +38,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
body: Introduction(
|
body: Introduction(
|
||||||
options: IntroductionOptions(
|
options: IntroductionOptions(
|
||||||
pages: (context) => [
|
pages: [
|
||||||
const IntroductionPage(
|
const IntroductionPage(
|
||||||
title: Text('First page'),
|
title: Text('First page'),
|
||||||
text: Text('Wow a page'),
|
text: Text('Wow a page'),
|
||||||
|
|
|
@ -1,21 +1,25 @@
|
||||||
name: flutter_introduction
|
name: flutter_introduction
|
||||||
description: Combined Package of Flutter Introduction Widget and Flutter Introduction Service
|
description: Combined Package of Flutter Introduction Widget and Flutter Introduction Service
|
||||||
version: 5.0.0
|
version: 3.1.0
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.0.0 <4.0.0"
|
sdk: ">=2.18.0 <3.0.0"
|
||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_introduction_widget:
|
flutter_introduction_widget:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
git:
|
||||||
version: "^5.0.0"
|
url: https://github.com/Iconica-Development/flutter_introduction
|
||||||
|
ref: 3.1.0
|
||||||
|
path: packages/flutter_introduction_widget
|
||||||
flutter_introduction_service:
|
flutter_introduction_service:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
git:
|
||||||
version: "^5.0.0"
|
url: https://github.com/Iconica-Development/flutter_introduction
|
||||||
|
ref: 3.1.0
|
||||||
|
path: packages/flutter_introduction_service
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -115,7 +115,7 @@ class _IntroductionState extends State<IntroductionFirebase> {
|
||||||
snapshot.data is List<IntroductionPageData>) {
|
snapshot.data is List<IntroductionPageData>) {
|
||||||
return IntroductionScreen(
|
return IntroductionScreen(
|
||||||
options: widget.options.copyWith(
|
options: widget.options.copyWith(
|
||||||
pages: (context) => snapshot.data!.map(
|
pages: snapshot.data?.map(
|
||||||
(e) {
|
(e) {
|
||||||
var title = e.title.isEmpty
|
var title = e.title.isEmpty
|
||||||
? ''
|
? ''
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: flutter_introduction_firebase
|
name: flutter_introduction_firebase
|
||||||
description: Flutter Introduction Page that uses firebase for the pages and some settings
|
description: Flutter Introduction Page that uses firebase for the pages and some settings
|
||||||
version: 5.0.0
|
version: 3.1.0
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.1.5 <4.0.0"
|
sdk: ">=3.1.5 <4.0.0"
|
||||||
|
@ -9,15 +9,19 @@ environment:
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
cloud_firestore: "^4.12.2"
|
cloud_firestore: ^4.12.2
|
||||||
cached_network_image: "^3.3.0"
|
cached_network_image: ^3.3.0
|
||||||
|
|
||||||
flutter_introduction_widget:
|
flutter_introduction_widget:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
git:
|
||||||
version: "^5.0.0"
|
url: https://github.com/Iconica-Development/flutter_introduction
|
||||||
|
ref: 3.1.0
|
||||||
|
path: packages/flutter_introduction_widget
|
||||||
flutter_introduction_service:
|
flutter_introduction_service:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
git:
|
||||||
version: "^5.0.0"
|
url: https://github.com/Iconica-Development/flutter_introduction
|
||||||
|
ref: 3.1.0
|
||||||
|
path: packages/flutter_introduction_service
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -1,18 +1,19 @@
|
||||||
name: flutter_introduction_interface
|
name: flutter_introduction_interface
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 5.0.0
|
version: 3.1.0
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.0 <4.0.0'
|
sdk: '>=2.18.0 <3.0.0'
|
||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_data_interface:
|
flutter_data_interface:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
git:
|
||||||
version: "^1.0.0"
|
url: https://github.com/Iconica-Development/flutter_data_interface.git
|
||||||
|
ref: 1.0.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -1,18 +1,20 @@
|
||||||
name: flutter_introduction_service
|
name: flutter_introduction_service
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 5.0.0
|
version: 3.1.0
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.0 <4.0.0'
|
sdk: '>=2.18.0 <3.0.0'
|
||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_introduction_interface:
|
flutter_introduction_interface:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
git:
|
||||||
version: "^5.0.0"
|
url: https://github.com/Iconica-Development/flutter_introduction
|
||||||
|
ref: 3.1.0
|
||||||
|
path: packages/flutter_introduction_interface
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -1,19 +1,21 @@
|
||||||
name: flutter_introduction_shared_preferences
|
name: flutter_introduction_shared_preferences
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 5.0.0
|
version: 3.1.0
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.0 <4.0.0'
|
sdk: '>=2.18.0 <3.0.0'
|
||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_introduction_interface:
|
flutter_introduction_interface:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
git:
|
||||||
version: "^5.0.0"
|
url: https://github.com/Iconica-Development/flutter_introduction
|
||||||
shared_preferences: "^2.2.0"
|
ref: 3.1.0
|
||||||
|
path: packages/flutter_introduction_interface
|
||||||
|
shared_preferences: any
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -31,7 +31,7 @@ class MyApp extends StatelessWidget {
|
||||||
),
|
),
|
||||||
home: IntroductionScreen(
|
home: IntroductionScreen(
|
||||||
options: IntroductionOptions(
|
options: IntroductionOptions(
|
||||||
pages: (context) => [
|
pages: [
|
||||||
const IntroductionPage(
|
const IntroductionPage(
|
||||||
title: Text('Basic Page'),
|
title: Text('Basic Page'),
|
||||||
text: Text(
|
text: Text(
|
||||||
|
|
|
@ -1,85 +1,77 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_introduction_widget/flutter_introduction_widget.dart';
|
import 'package:flutter_introduction_widget/flutter_introduction_widget.dart';
|
||||||
|
|
||||||
List<IntroductionPage> defaultIntroductionPages(BuildContext context) {
|
const List<IntroductionPage> defaultIntroductionPages = [
|
||||||
var theme = Theme.of(context);
|
IntroductionPage(
|
||||||
return [
|
title: Column(
|
||||||
IntroductionPage(
|
children: [
|
||||||
title: Column(
|
SizedBox(height: 50),
|
||||||
children: [
|
Text(
|
||||||
const SizedBox(height: 50),
|
'welcome to iconinstagram',
|
||||||
Text(
|
|
||||||
'welcome to iconinstagram',
|
|
||||||
style: theme.textTheme.headlineLarge,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 6),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
graphic: const Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'assets/first.png',
|
|
||||||
package: 'flutter_introduction_widget',
|
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 6),
|
||||||
text: Text(
|
],
|
||||||
'Welcome to the world of Instagram, where creativity'
|
),
|
||||||
' knows no bounds and connections are made'
|
graphic: Image(
|
||||||
' through captivating visuals.',
|
image: AssetImage(
|
||||||
textAlign: TextAlign.center,
|
'assets/first.png',
|
||||||
style: theme.textTheme.bodyMedium,
|
package: 'flutter_introduction_widget',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IntroductionPage(
|
text: Text(
|
||||||
title: Column(
|
'Welcome to the world of Instagram, where creativity'
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
' knows no bounds and connections are made'
|
||||||
children: [
|
' through captivating visuals.',
|
||||||
const SizedBox(height: 50),
|
textAlign: TextAlign.center,
|
||||||
Text(
|
),
|
||||||
'discover iconinstagram',
|
),
|
||||||
style: theme.textTheme.headlineLarge,
|
IntroductionPage(
|
||||||
),
|
title: Column(
|
||||||
const SizedBox(height: 6),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
],
|
children: [
|
||||||
),
|
SizedBox(height: 50),
|
||||||
text: Text(
|
Text(
|
||||||
'Dive into the vibrant world of'
|
'discover iconinstagram',
|
||||||
' Instagram and discover endless possibilities.'
|
|
||||||
' From stunning photography to engaging videos,'
|
|
||||||
' Instagram offers a diverse range of content to explore and enjoy.',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: theme.textTheme.bodyMedium,
|
|
||||||
),
|
|
||||||
graphic: const Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'assets/second.png',
|
|
||||||
package: 'flutter_introduction_widget',
|
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 6),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
text: Text(
|
||||||
|
'Dive into the vibrant world of'
|
||||||
|
' Instagram and discover endless possibilities.'
|
||||||
|
' From stunning photography to engaging videos,'
|
||||||
|
' Instagram offers a diverse range of content to explore and enjoy.',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
graphic: Image(
|
||||||
|
image: AssetImage(
|
||||||
|
'assets/second.png',
|
||||||
|
package: 'flutter_introduction_widget',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IntroductionPage(
|
),
|
||||||
title: Column(
|
IntroductionPage(
|
||||||
children: [
|
title: Column(
|
||||||
const SizedBox(height: 50),
|
children: [
|
||||||
Text(
|
SizedBox(height: 50),
|
||||||
'elevate your experience',
|
Text(
|
||||||
style: theme.textTheme.headlineLarge,
|
'elevate your experience',
|
||||||
),
|
|
||||||
const SizedBox(height: 6),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
graphic: const Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'assets/third.png',
|
|
||||||
package: 'flutter_introduction_widget',
|
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 6),
|
||||||
text: Text(
|
],
|
||||||
'Whether promoting your business, or connecting'
|
),
|
||||||
' with friends and family, Instagram provides the'
|
graphic: Image(
|
||||||
' tools and platform to make your voice heard.',
|
image: AssetImage(
|
||||||
textAlign: TextAlign.center,
|
'assets/third.png',
|
||||||
style: theme.textTheme.bodyMedium,
|
package: 'flutter_introduction_widget',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
];
|
text: Text(
|
||||||
}
|
'Whether promoting your business, or connecting'
|
||||||
|
' with friends and family, Instagram provides the'
|
||||||
|
' tools and platform to make your voice heard.',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
|
@ -75,7 +75,6 @@ class IntroductionOptions {
|
||||||
this.controlMode = IntroductionControlMode.previousNextButton,
|
this.controlMode = IntroductionControlMode.previousNextButton,
|
||||||
this.dotSize = 12,
|
this.dotSize = 12,
|
||||||
this.dotSpacing = 24,
|
this.dotSpacing = 24,
|
||||||
this.dotColor,
|
|
||||||
}) : assert(
|
}) : assert(
|
||||||
!(identical(indicatorMode, IndicatorMode.custom) &&
|
!(identical(indicatorMode, IndicatorMode.custom) &&
|
||||||
indicatorBuilder == null),
|
indicatorBuilder == null),
|
||||||
|
@ -96,7 +95,7 @@ class IntroductionOptions {
|
||||||
|
|
||||||
/// List of introduction pages to set the text, icons or images for the
|
/// List of introduction pages to set the text, icons or images for the
|
||||||
/// introduction screens.
|
/// introduction screens.
|
||||||
final List<IntroductionPage> Function(BuildContext context) pages;
|
final List<IntroductionPage> pages;
|
||||||
|
|
||||||
/// Determines whether the user can tap the screen to go to the next
|
/// Determines whether the user can tap the screen to go to the next
|
||||||
/// introduction screen.
|
/// introduction screen.
|
||||||
|
@ -213,13 +212,9 @@ class IntroductionOptions {
|
||||||
/// The distance between the center of each dot. Default is 24
|
/// The distance between the center of each dot. Default is 24
|
||||||
final double dotSpacing;
|
final double dotSpacing;
|
||||||
|
|
||||||
/// The color of the dots in the indicator. Default is the primary color of
|
|
||||||
/// the theme
|
|
||||||
final Color? dotColor;
|
|
||||||
|
|
||||||
IntroductionOptions copyWith({
|
IntroductionOptions copyWith({
|
||||||
IntroductionScreenMode? mode,
|
IntroductionScreenMode? mode,
|
||||||
List<IntroductionPage> Function(BuildContext context)? pages,
|
List<IntroductionPage>? pages,
|
||||||
bool? tapEnabled,
|
bool? tapEnabled,
|
||||||
IntroductionScreenButtonMode? buttonMode,
|
IntroductionScreenButtonMode? buttonMode,
|
||||||
IntroductionLayoutStyle? layoutStyle,
|
IntroductionLayoutStyle? layoutStyle,
|
||||||
|
@ -264,7 +259,7 @@ class IntroductionTranslations {
|
||||||
this.skipButton = 'Skip',
|
this.skipButton = 'Skip',
|
||||||
this.nextButton = 'Next',
|
this.nextButton = 'Next',
|
||||||
this.previousButton = 'Previous',
|
this.previousButton = 'Previous',
|
||||||
this.finishButton = 'Get started',
|
this.finishButton = 'Get Started',
|
||||||
});
|
});
|
||||||
final String skipButton;
|
final String skipButton;
|
||||||
final String nextButton;
|
final String nextButton;
|
||||||
|
@ -274,10 +269,22 @@ class IntroductionTranslations {
|
||||||
|
|
||||||
class IntroductionButtonTextstyles {
|
class IntroductionButtonTextstyles {
|
||||||
const IntroductionButtonTextstyles({
|
const IntroductionButtonTextstyles({
|
||||||
this.skipButtonStyle,
|
this.skipButtonStyle = const TextStyle(
|
||||||
this.nextButtonStyle,
|
fontSize: 16,
|
||||||
this.previousButtonStyle,
|
fontWeight: FontWeight.w500,
|
||||||
this.finishButtonStyle,
|
),
|
||||||
|
this.nextButtonStyle = const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
this.previousButtonStyle = const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
this.finishButtonStyle = const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
});
|
});
|
||||||
final TextStyle? skipButtonStyle;
|
final TextStyle? skipButtonStyle;
|
||||||
final TextStyle? nextButtonStyle;
|
final TextStyle? nextButtonStyle;
|
||||||
|
|
|
@ -77,7 +77,7 @@ class _MultiPageIntroductionScreenState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var pages = widget.options.pages.call(context);
|
var pages = widget.options.pages;
|
||||||
var translations = widget.options.introductionTranslations;
|
var translations = widget.options.introductionTranslations;
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
|
@ -150,7 +150,6 @@ class _MultiPageIntroductionScreenState
|
||||||
AnimatedBuilder(
|
AnimatedBuilder(
|
||||||
animation: _currentPage,
|
animation: _currentPage,
|
||||||
builder: (context, _) => Indicator(
|
builder: (context, _) => Indicator(
|
||||||
options: widget.options,
|
|
||||||
indicatorBuilder: widget.options.indicatorBuilder,
|
indicatorBuilder: widget.options.indicatorBuilder,
|
||||||
mode: widget.options.indicatorMode,
|
mode: widget.options.indicatorMode,
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
|
@ -342,7 +341,6 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
var translations = options.introductionTranslations;
|
var translations = options.introductionTranslations;
|
||||||
var showFinishButton =
|
var showFinishButton =
|
||||||
options.buttonMode == IntroductionScreenButtonMode.singleFinish;
|
options.buttonMode == IntroductionScreenButtonMode.singleFinish;
|
||||||
var theme = Theme.of(context);
|
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
@ -364,8 +362,7 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
translations.previousButton,
|
translations.previousButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options.introductionButtonTextstyles
|
||||||
.previousButtonStyle ??
|
.previousButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
IntroductionButtonType.previous,
|
IntroductionButtonType.previous,
|
||||||
) ??
|
) ??
|
||||||
|
@ -387,8 +384,7 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
translations.previousButton,
|
translations.previousButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options.introductionButtonTextstyles
|
||||||
.previousButtonStyle ??
|
.previousButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -412,9 +408,8 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
_next,
|
_next,
|
||||||
Text(
|
Text(
|
||||||
translations.nextButton,
|
translations.nextButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options
|
||||||
.nextButtonStyle ??
|
.introductionButtonTextstyles.nextButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
IntroductionButtonType.next,
|
IntroductionButtonType.next,
|
||||||
) ??
|
) ??
|
||||||
|
@ -435,8 +430,7 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
translations.nextButton,
|
translations.nextButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options.introductionButtonTextstyles
|
||||||
.nextButtonStyle ??
|
.nextButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -460,9 +454,8 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
},
|
},
|
||||||
Text(
|
Text(
|
||||||
translations.finishButton,
|
translations.finishButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options
|
||||||
.finishButtonStyle ??
|
.introductionButtonTextstyles.finishButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
IntroductionButtonType.finish,
|
IntroductionButtonType.finish,
|
||||||
) ??
|
) ??
|
||||||
|
@ -485,8 +478,7 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
translations.finishButton,
|
translations.finishButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options.introductionButtonTextstyles
|
||||||
.finishButtonStyle ??
|
.finishButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -520,9 +512,8 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
},
|
},
|
||||||
Text(
|
Text(
|
||||||
translations.finishButton,
|
translations.finishButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options
|
||||||
.finishButtonStyle ??
|
.introductionButtonTextstyles.finishButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
IntroductionButtonType.finish,
|
IntroductionButtonType.finish,
|
||||||
) ??
|
) ??
|
||||||
|
@ -546,8 +537,7 @@ class IntroductionTwoButtons extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
translations.finishButton,
|
translations.finishButton,
|
||||||
style: options.introductionButtonTextstyles
|
style: options.introductionButtonTextstyles
|
||||||
.finishButtonStyle ??
|
.finishButtonStyle,
|
||||||
theme.textTheme.bodyMedium,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -17,7 +17,6 @@ class Indicator extends StatelessWidget {
|
||||||
required this.indicatorBuilder,
|
required this.indicatorBuilder,
|
||||||
required this.dotSize,
|
required this.dotSize,
|
||||||
required this.dotSpacing,
|
required this.dotSpacing,
|
||||||
required this.options,
|
|
||||||
super.key,
|
super.key,
|
||||||
}) : assert(
|
}) : assert(
|
||||||
!(mode == IndicatorMode.custom && indicatorBuilder == null),
|
!(mode == IndicatorMode.custom && indicatorBuilder == null),
|
||||||
|
@ -47,8 +46,6 @@ class Indicator extends StatelessWidget {
|
||||||
/// The distance between the center of each dot.
|
/// The distance between the center of each dot.
|
||||||
final double dotSpacing;
|
final double dotSpacing;
|
||||||
|
|
||||||
final IntroductionOptions options;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var theme = Theme.of(context);
|
var theme = Theme.of(context);
|
||||||
|
@ -60,7 +57,7 @@ class Indicator extends StatelessWidget {
|
||||||
dotSize: dotSize,
|
dotSize: dotSize,
|
||||||
dotSpacing: dotSpacing,
|
dotSpacing: dotSpacing,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
color: options.dotColor ?? theme.colorScheme.primary,
|
color: theme.colorScheme.secondary,
|
||||||
itemCount: count,
|
itemCount: count,
|
||||||
onPageSelected: (int page) {
|
onPageSelected: (int page) {
|
||||||
unawaited(
|
unawaited(
|
||||||
|
@ -76,7 +73,7 @@ class Indicator extends StatelessWidget {
|
||||||
return DashIndicator(
|
return DashIndicator(
|
||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
selectedColor: options.dotColor ?? theme.colorScheme.primary,
|
selectedColor: theme.colorScheme.primary,
|
||||||
itemCount: count,
|
itemCount: count,
|
||||||
onPageSelected: (int page) {
|
onPageSelected: (int page) {
|
||||||
unawaited(
|
unawaited(
|
||||||
|
@ -197,7 +194,7 @@ class DotsIndicator extends AnimatedWidget {
|
||||||
color:
|
color:
|
||||||
(((controller.page ?? controller.initialPage).round()) == index
|
(((controller.page ?? controller.initialPage).round()) == index
|
||||||
? color
|
? color
|
||||||
: color.withAlpha(62)),
|
: color.withAlpha(125)),
|
||||||
type: MaterialType.circle,
|
type: MaterialType.circle,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
name: flutter_introduction_widget
|
name: flutter_introduction_widget
|
||||||
description: Flutter Introduction Widget for showing a list of introduction pages on a single scrollable page or horizontal pageview
|
description: Flutter Introduction Widget for showing a list of introduction pages on a single scrollable page or horizontal pageview
|
||||||
version: 5.0.0
|
version: 3.1.0
|
||||||
homepage: https://github.com/Iconica-Development/flutter_introduction_widget
|
homepage: https://github.com/Iconica-Development/flutter_introduction_widget
|
||||||
|
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.0.0 <4.0.0"
|
sdk: ">=2.18.0 <3.0.0"
|
||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
name: flutter_introduction_workspace
|
name: flutter_introduction_workspace
|
||||||
description: The use case level package using both the flutter_introduction_widget and the flutter_introduction_service combined
|
version: 3.1.0
|
||||||
version: 5.0.0
|
|
||||||
|
|
||||||
publish_to: None
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.0 <4.0.0'
|
sdk: '>=3.1.0 <4.0.0'
|
||||||
|
|
Loading…
Reference in a new issue