feedback_page 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • new48

feedback_page #

pub package

Flutter package for add feedback page to your application.

Show Cases #

12gif example
12gif example

Use this package : #

1. Depend on it #

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

dependencies:
  feedback_page: ^0.0.1

2. Install it #

You can install packages from the command line:

with Flutter:

$ flutter pub get

3. Import it #

Now in your Dart code, you can use:

import 'package:feedback_page/feedback_page.dart';

Widget constructor : #

PropNameDescriptiondefault valueoptional
percentCallbackget slider value percent-true
imgPathlist with string type involved assets of images-false
backgroundColorcolor of widget background-false
closeIconthis icon is locate top right in widget-false
closeIconColorcolor of closeIcon with Color typeColors.blacktrue
closeIconSizesize of closeIcon with double type30true
closeIconOnPresspass a function to this prop-false
mainTitletitle is locate in tope center in widget pass a string to this prop-false
mainTitleStylestyle of main title pass a TextStyle to this oneTextStyle(fontWeight: FontWeight.bold, fontSize: 30)true
imageWidthpass double to this prop (size of image widget)200true
imageHeightpass double to this prop (size of image widget)200true
minValueWidgetthis widget shown in left side of slider-false
maxValueWidgetthis widget shown in left side of slider-false
defaultSliderValuedefault value of slider (thumb show you this value at first)0true
btnChildwidget is type of this prop . widget is show in the button-false
btnOnPresspass a function to this prop-false
btnColorcolor of button with Color typeColors.blacktrue
btnBorderRadiuspass double to give value radius of button30true
btnHeightpass double to give value height of button200true
btnWidthpass double to give value width of button50true
sliderThemeDataif you want have Custom slider pass SliderThemeData hereSliderThemeData()true
alignmentControllerDurationDuration to forward alignment animationDuration(milliseconds: 700)true
zoomControllerDurationDuration to forward zoom(in/out) animationDuration(milliseconds: 200)true
alignmentAnimationCurve-Curves.easetrue
zoomAnimationCurve-Curves.easetrue

[0.0.1]. #

initial release.

[0.0.2] - 2020 29 June. #

Add readme to package .

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:feedback_page/feedback_page.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var value = 0;
    return MaterialApp(
      title: 'Flutter Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: First(),
    );
  }
}

class First extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: RaisedButton(
          onPressed: () {
            Navigator.push(
                context, MaterialPageRoute(builder: (context) => Second()));
          },
          child: Text('FeedBack Page'),
        ),
      ),
    );
  }
}

class Second extends StatefulWidget {
  @override
  _SecondState createState() => _SecondState();
}

class _SecondState extends State<Second> {
  List<String> list = [
    'assets/images/sad.png',
    'assets/images/mid.png',
    'assets/images/happy.png',
  ];

  @override
  Widget build(BuildContext context) {
    var myValue = 0.0;

    return FeedbackPage(
      percentCallback: (value) {
        myValue = value;
      },
      imgPath: list,
      backgroundColor: Colors.teal,
      closeIcon: Icons.close,
      closeIconOnPress: () {
        print('close clicked');
        print(myValue);
      },
      btnChild: Text(
        'Done',
        style: TextStyle(color: Colors.white),
      ),
      mainTitle: 'What is your feedback ?!',
      maxValueWidget: Container(
        width: 50,
        height: 50,
        decoration: BoxDecoration(
            color: Colors.black,
            borderRadius: BorderRadius.all(Radius.circular(30))),
        child: Center(
          child: Text(
            'Good',
            style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
          ),
        ),
      ),
      btnOnPress: () {
        Navigator.pop(context);
      },
      minValueWidget: Container(
        width: 50,
        height: 50,
        decoration: BoxDecoration(
            color: Colors.black,
            borderRadius: BorderRadius.all(Radius.circular(30))),
        child: Center(
          child: Text(
            'Bad',
            style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
          ),
        ),
      ),
      defaultSliderValue: 0,
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  feedback_page: ^0.0.2

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:feedback_page/feedback_page.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • feedback_page that is a package requiring null.

Health issues and suggestions

Document public APIs. (-0.00 points)

28 out of 29 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.

Format lib/feedback_page.dart.

Run flutter format to format lib/feedback_page.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test