first_time_screen 1.0.3
First Time Screen #
- Displays an intro screen if app has been opened for the first time
Usage #
- Add the dependency to your pubspec.yaml.
dependencies:
flutter:
sdk: flutter
first_time_screen:
- How to use
FirstTimeScreen(
loadingScreen: Text("Loading"),
introScreen: MaterialPageRoute(builder: (context) => Intro()),
landingScreen: MaterialPageRoute(builder: (context) => Home()),
)
1.0.3 #
- Fixed variable name
1.0.2 #
- Example fixes
1.0.1 #
- Added example
1.0.0 #
- Initial version
import 'package:first_time_screen/first_time_screen.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'FirstTimeScreen Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: FirstTimeScreen(
loadingScreen: Center(
child: Text("Loading Screen"),
),
introScreen: MaterialPageRoute(builder: (context) => Intro()),
landingScreen: MaterialPageRoute(builder: (context) => Landing()),
),
);
}
}
class Landing extends StatelessWidget {
const Landing({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Text("Landing"),
),
);
}
}
class Intro extends StatelessWidget {
const Intro({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Text("Intro"),
),
);
}
}
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
first_time_screen: ^1.0.3
2. Install it
You can install packages from the command line:
with Flutter:
$ flutter pub get
Alternatively, your editor might support flutter pub get
.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:first_time_screen/first_time_screen.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
34
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
80
|
Overall:
Weighted score of the above.
[more]
|
63
|
Learn more about scoring.
We analyzed this package on Dec 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.6
Maintenance issues and suggestions
Homepage URL doesn't exist. (-20 points)
At the time of the analysis the homepage
field https://github.com/petercinibulk/flutter-tools/tree/master/intro_screen
was unreachable.
Dependencies
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.1.0 <3.0.0 | ||
flutter | 0.0.0 | ||
shared_preferences | ^0.5.0 | 0.5.4+8 | 0.5.6 |
Transitive dependencies | |||
collection | 1.14.11 | 1.14.12 | |
meta | 1.1.7 | 1.1.8 | |
shared_preferences_platform_interface | 1.0.1 | ||
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 | ||
Dev dependencies | |||
flutter_test |