neuron_inbox 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new44

neuroninbox #

A new Flutter package.

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.0.1] - TODO: Add release date. #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:neuron_inbox/inbox_layout.dart';
import 'package:neuron_inbox/model/model.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Inbox',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  List<Data> dataList = new List();

  @override
  void initState() {
    dataList.add(new Data(data1: '2', data2: 'Info Tagihan Januari', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-Januari-2020'));
    dataList.add(new Data(data1: '2', data2: 'Info Tagihan Februari', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-Februari-2020'));
    dataList.add(new Data(data1: '2', data2: 'Info Tagihan Maret', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-Maret-2020'));
    dataList.add(new Data(data1: '1', data2: 'Info Tagihan April', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-April-2020'));
    dataList.add(new Data(data1: '1', data2: 'Info Tagihan Mei', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-Mei-2020'));
    dataList.add(new Data(data1: '2', data2: 'Info Tagihan Juni', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-Juni-2020'));
    dataList.add(new Data(data1: '1', data2: 'Info Tagihan Juli', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-Juli-2020'));
    dataList.add(new Data(data1: '1', data2: 'Info Tagihan Agustus', data3: 'Harap bayar tagihan bulan ini segera, jika tidak segera membayar akan dikenakan denda 100%', data4: '1-Agustus-2020'));

    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      resizeToAvoidBottomInset: false,
      body: Padding(
        padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
        child: loadInboxLayout(dataList, false, 'Inbox', 'Detail Inbox'),
      ),
    );
  }

  InboxLayout loadInboxLayout(dataList, showLoading, titleListInbox, titleDetailListInbox){
    return InboxLayout(
      dataListInbox: dataList,
      showLoading: showLoading,
      titleListInbox: titleListInbox,
      titleDetailListInbox: titleDetailListInbox,
      imageRead: 'assets/images/dot_grey.png',
      imageUnRead: 'assets/images/dot.png',
      onDeleteTap: (value){
        print('Deleted '+value.toString());
      },
      onDetailTap: (value){
        print('Detail '+value.toString());
      },
      onRefresh: (value){
        print('Refresh '+value.toString());
        setState(() {
          loadInboxLayout(dataList, true, 'Inbox', 'Detail Inbox');
        });
      },
      endOfList: (value){
        print('End of list '+value.toString());
      },
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  neuron_inbox: ^0.0.1

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

We analyzed this package on Jul 9, 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:

  • neuron_inbox that is a package requiring null.

Health issues and suggestions

Document public APIs. (-0.07 points)

151 out of 156 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.

Fix lib/component/component_navigations.dart. (-0.50 points)

Analysis of lib/component/component_navigations.dart reported 1 hint:

line 4 col 8: Unused import: 'component_alerts.dart'.

Fix lib/detail/detail_inbox_layout.dart. (-0.50 points)

Analysis of lib/detail/detail_inbox_layout.dart reported 1 hint:

line 1 col 8: Unused import: 'dart:convert'.

Fix lib/inbox_layout.dart. (-0.50 points)

Analysis of lib/inbox_layout.dart reported 1 hint:

line 8 col 8: Unused import: 'detail/detail_inbox_page.dart'.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/component/component_style_guides.dart (Run flutter format to format lib/component/component_style_guides.dart.)
  • lib/detail/detail_inbox_page.dart (Run flutter format to format lib/detail/detail_inbox_page.dart.)
  • lib/model/model.dart (Run flutter format to format lib/model/model.dart.)
  • lib/neuron_inbox.dart (Run flutter format to format lib/neuron_inbox.dart.)

Maintenance suggestions

The package description is too short. (-16 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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.1.0 <3.0.0
flutter 0.0.0
flutter_slidable ^0.5.4 0.5.4
font_awesome_flutter ^8.8.1 8.8.1
shimmer ^1.1.1 1.1.1
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