get_started 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 22

Flutter Getting Started Layout #

Codacy Badge

A Custom Getting Started Layout with custom Fonts and Colors.

Preview #

The example app running in Android

Installing #

  1. Add dependency to pubspec.yaml

    Get the latest version in the 'Installing' tab on pub.dartlang.org

dependencies:
    get_started: 0.0.1
  1. Import the packages
import 'package:get_started/classes/walkthrough.dart';
import 'package:get_started/classes/page.dart';
import 'package:get_started/get_started.dart';
import 'package:page_indicator/page_indicator.dart';
  1. Adding GetStarted layout

#With required parameters#

   //In the body of your MaterialApp,
   
    @override
                Widget build(BuildContext context) {
                  return new MaterialApp(
                    debugShowCheckedModeBanner: false,
                    home: Scaffold(
                      //Required Field
                      //body: GetStarted(pageList : pageList),
                      
                      //Required Field with Optional parameters
                      body: GetStarted(pageList : pageList, pageStyle: pageObj, indicatorShape : IndicatorShape.circle(size: 12.0),
                      onFinishPress: _finishPress, onSkipPress: _skipPress),
                    ),
                  );
                }
                
              void _skipPress() {
                    //define your skipButton functionality here.
              }
                
              void _finishPress() {
                    //define your lastNextButton functionality here.
              }

#With optional parameters#

   //All the properties defined for 'page' have some default values. Hence, you may skip some size, etc. if you wish to! But defining a pageObj of page class is a must, so as to pass it as a parameter in GetStarted().
        
          page pageObj = new page(
              bgColor: "#ffffff",
              indicatorColor: "#ffffff",
              indicatorSelectorColor: "#195599",
              nextButtonText: "NEXT",
              nextButtonColor: "#195599",
              nextButtonFont: "Lato",
              nextButtonSize: 20.0,
              skipButtonText: "SKIP",
              skipButtonFont: "Lato",
              skipButtonColor: "#195599",
              skipButtonSize: 20.0,
              lastNextButton:
                  "FINISH", //You may also write "GOT IT" or whatever you wish :)
              lastButtonColor: "#1f8e2f",
              lastButtonFont: "Lato",
              lastButtonSize: 20.0);
              
   //A Page has three sections for Title, Description and an Icon respectively that can be customized for the text, font, color and size.
      
    final List<walkthrough> pageList = [
        walkthrough(
            pageColor: "#48C9B0",
            title: "Welcome!",
            titleFont:
                "Lato", //Don't forget to include yours fonts in pubspec.yaml file.
            titleColor: "#ffffff", //Pass the colours as strings of their hex codes.
            titleSize: 25.0,
            description:
                "This is a Scrollable Text Widget. Hence, don't worry if your description goes long. :) \n\nA Page has three sections for Title, Description and an Icon respectively that can be customized for the text, font, color and size.\n\nAll the properties defined for 'walkthrough' have some default values. Hence, you may skip some size, etc. if you wish to!",
            descriptionFont: "Lato",
            descriptionColor: "#ffffff",
            descriptionSize: 16.0,
            imageIcon: Icon(
              Icons.computer,
              color: Colors.white,
              size: 100.0,
            ))
        ];    

How to use #

Check out the example app in the example directory or the 'Example' tab on pub.dartlang.org for a more complete example.

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.1.0] - June 22, 2019 Release #

  • This package contains a Layout screen that can be used as similar to Getting Started Tutorial guide in a Mobile Application.

example/lib/example.dart

import 'package:flutter/material.dart';
import 'package:get_started/classes/walkthrough.dart';
import 'package:get_started/classes/page.dart';
import 'package:get_started/get_started.dart';
import 'package:page_indicator/page_indicator.dart';

void main() {
  runApp(new MyApp1());
}

class MyApp1 extends StatefulWidget {
  //All the properties defined for 'page' have some default values. Hence, you may skip some size, etc. if you wish to!
  @override
  _MyApp1State createState() => _MyApp1State();
}

class _MyApp1State extends State<MyApp1> {
  Page pageObj = new Page(
      bgColor: "#ffffff",
      indicatorColor: "#ffffff",
      indicatorSelectorColor: "#195599",
      nextButtonText: "NEXT",
      nextButtonColor: "#195599",
      nextButtonFont: "Lato",
      nextButtonSize: 20.0,
      skipButtonText: "SKIP",
      skipButtonFont: "Lato",
      skipButtonColor: "#195599",
      skipButtonSize: 20.0,
      lastNextButton:
          "FINISH", //You may also write "GOT IT" or whatever you wish :)
      lastButtonColor: "#1f8e2f",
      lastButtonFont: "Lato",
      lastButtonSize: 20.0);

  List<Walkthrough> pageList = [
    Walkthrough(
        pageColor: "#48C9B0",
        title: "Welcome!",
        titleFont:
            "Lato", //Don't forget to include yours fonts in pubspec.yaml file.
        titleColor: "#ffffff", //Pass the colours as strings of their hex codes.
        titleSize: 25.0,
        description:
            "This is a Scrollable Text Widget. Hence, don't worry if your description goes long. :) \n\nA Page has three sections for Title, Description and an Icon respectively that can be customized for the text, font, color and size.\n\nAll the properties defined for 'walkthrough' have some default values. Hence, you may skip some size, etc. if you wish to!",
        descriptionFont: "Lato",
        descriptionColor: "#ffffff",
        descriptionSize: 16.0,
        imageIcon: Icon(
          Icons.computer,
          color: Colors.white,
          size: 100.0,
        )),
    Walkthrough(
        pageColor: "#EC7063",
        title: "Add a photo!",
        description: "Building your memory lane with your photographs. :)",
        imageIcon: Icon(
          Icons.add_a_photo,
          color: Colors.white,
          size: 100.0,
        )),
    Walkthrough(
        pageColor: "#F4D03F",
        title: "Documents",
        description: "Store your files safe and sound here.",
        imageIcon: Icon(
          Icons.description,
          color: Colors.white,
          size: 100.0,
        )),
  ];

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: Text(
            "Getting Started",
            style: TextStyle(fontFamily: "Lato"),
          ),
          backgroundColor: Color(0xff195599),
        ), //appBar

        //Required Field
        //body: GetStarted(pageList : pageList),

        //Required Field with Optional parameters
        body: GetStarted(
            pageList: pageList,
            pageStyle: pageObj,
            indicatorShape: IndicatorShape.circle(size: 12.0),
            onFinishPress: _finishPress,
            onSkipPress: _skipPress),
      ),
    );
  }

  void _skipPress() {
    //define your skipButton functionality here.
  }

  void _finishPress() {
    //define your lastNextButton functionality here.
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  get_started: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:get_started/get_started.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
31
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
62
Overall:
Weighted score of the above. [more]
22
Learn more about scoring.

We analyzed this package on Jul 3, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Health issues and suggestions

Fix lib/get_started.dart. (-68.52 points)

Analysis of lib/get_started.dart failed with 4 errors, 1 hint:

line 13 col 3: The name 'Page' is defined in the libraries 'package:flutter/src/widgets/navigator.dart' and 'package:get_started/classes/page.dart'.

line 13 col 17: The name 'Page' is defined in the libraries 'package:flutter/src/widgets/navigator.dart' and 'package:get_started/classes/page.dart'.

line 15 col 53: The name 'Page' is defined in the libraries 'package:flutter/src/widgets/navigator.dart' and 'package:get_started/classes/page.dart'.

line 31 col 3: The name 'Page' is defined in the libraries 'package:flutter/src/widgets/navigator.dart' and 'package:get_started/classes/page.dart'.

line 8 col 7: This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: GetStarted.pageList, GetStarted.indicatorShape, GetStarted.pg

Document public APIs. (-0.32 points)

42 out of 43 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (page_indicator).

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Package is getting outdated. (-3.01 points)

The package was last published 53 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
page_indicator ^0.2.0 0.2.1 0.3.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test