appback_sdk 0.0.1+1

  • Readme
  • Changelog
  • Example
  • Installing
  • new51

app_back #

The official Flutter library for Appback.

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] - 06/11/2020 #

  • First version of AppBack.

[0.0.1+1] - 06/11/2020 #

  • Formatted code
  • Added LICENSE

example/lib/main.dart

import 'package:appback_sdk/app_back.dart';
import 'package:flutter/material.dart';
import 'package:hello_example/event_logs_view.dart';

import 'toggles_view.dart';
import 'translations_view.dart';

void main() async {
    AppBack.instance.configure("YOUR_API_KEY");
    runApp(AppBackExample());
}

class AppBackExample extends StatefulWidget {
    @override
    _AppBackExampleState createState() => _AppBackExampleState();
}

class _AppBackExampleState extends State<AppBackExample> {
    
    int _currentIndex = 0;
    
    @override
    Widget build(BuildContext context) {
        return MaterialApp(
            home: Scaffold(
                body: _getCurrentScreen(),
                bottomNavigationBar: BottomNavigationBar(
                    items: <BottomNavigationBarItem>[
                        BottomNavigationBarItem(
                            icon: Icon(Icons.translate),
                            title: Text('Translations'),
                        ),
                        BottomNavigationBarItem(
                            icon: Icon(Icons.power_settings_new),
                            title: Text('Toggles'),
                        ),
                        BottomNavigationBarItem(
                            icon: Icon(Icons.event_note),
                            title: Text('Event Log'),
                        ),
                    ],
                    currentIndex: _currentIndex,
                    onTap: (newIndex) => setState(() => _currentIndex = newIndex),
                ),
            ),
        );
    }
    
    Widget _getCurrentScreen() {
        switch(_currentIndex) {
            case 0:
                return TranslationsView();
            case 1:
                return TogglesView();
            case 2:
                return EventLogsView();
            default:
                return TranslationsView();
        }
    }
}

Use this package as a library

1. Depend on it

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


dependencies:
  appback_sdk: ^0.0.1+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:appback_sdk/app_back.dart';
import 'package:appback_sdk/exceptions/app_back_exception.dart';
import 'package:appback_sdk/models/auth.dart';
import 'package:appback_sdk/models/endpoint.dart';
import 'package:appback_sdk/models/toggle.dart';
import 'package:appback_sdk/models/token.dart';
import 'package:appback_sdk/models/translation.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
5
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]
51
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 does not support Flutter platform linux

Because:

  • package:appback_sdk/app_back.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:appback_sdk/app_back.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:appback_sdk/app_back.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:appback_sdk/app_back.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • appback_sdk that is a package requiring null.

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.6.0 <3.0.0
flutter 0.0.0
http ^0.12.0+4 0.12.1
json_annotation ^3.0.0 3.0.1
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
http_parser 3.1.4
meta 1.1.8 1.2.2
path 1.7.0
pedantic 1.9.0 1.9.2
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
build_runner ^1.7.3
flutter_test
json_serializable ^3.2.5