auto_json_to_dart_converter 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

Auto Json to Dart Converter #

AUTO JSON TO DART CONVERT

Just provide the api link and Dart is created on the device with folder name json_to_dart.

Installation #

First, add auto_json_to_dart_converter: as a dependency in your pubspec.yaml file.

Import

import 'package:auto_json_to_dart_converter/auto_json_to_dart_converter.dart';

Just Provide api link and class name

Future<void> getdata() async {
    AutoJsonToDartConverterGetMethod(
            'https://raw.githubusercontent.com/javiercbk/json_to_dart/master/example/sample.json',
            'Zeeshan',null)
        .getmethod
        .then((onValue) {
      print(onValue.toString());
    }).catchError((onError) {
      print(onError.toString());
    });
  }

Special thanks to Javiercbk

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

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

MIT License

Copyright (c) 2020 Zeeshux7860

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.0.0 #

  • Initial Release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:auto_json_to_dart_converter/auto_json_to_dart_converter.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
 

  @override
  void initState() {
    super.initState();
    // tests();
    getdata();
  }

 
  Future<void> getdata() async {
    AutoJsonToDartConverterGetMethod(
            'https://raw.githubusercontent.com/javiercbk/json_to_dart/master/example/sample.json',
            'Zeeshan',null)
        .getmethod
        .then((onValue) {
      print(onValue.toString());
    }).catchError((onError) {
      print(onError.toString());
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('great'),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


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

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:auto_json_to_dart_converter/auto_json_to_dart_converter.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:auto_json_to_dart_converter/auto_json_to_dart_converter.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:auto_json_to_dart_converter/auto_json_to_dart_converter.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:auto_json_to_dart_converter/auto_json_to_dart_converter.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [auto_json_to_dart_converter] that is in a package requiring null.

Health suggestions

Fix lib/convert/syntax.dart. (-1 points)

Analysis of lib/convert/syntax.dart reported 2 hints:

line 78 col 17: Override hashCode if overriding ==.

line 175 col 17: Override hashCode if overriding ==.

Format lib/auto_json_to_dart_converter.dart.

Run flutter format to format lib/auto_json_to_dart_converter.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
convert ^2.0.1 2.1.1
dart_style ^1.0.10 1.3.6
ext_storage ^1.0.2 1.0.3
flutter 0.0.0
http ^0.12.0+4 0.12.1
json_ast ^1.0.5 1.0.5
Transitive dependencies
_fe_analyzer_shared 5.0.0
analyzer 0.39.11
args 1.6.0
async 2.4.1
charcode 1.1.3
collection 1.14.12 1.14.13
crypto 2.1.5
csslib 0.16.1
glob 1.2.0
grapheme_splitter 1.0.0
html 0.14.0+3
http_parser 3.1.4
js 0.6.2
meta 1.1.8
node_interop 1.1.1
node_io 1.1.1
package_config 1.9.3
path 1.7.0
pedantic 1.9.0 1.9.1
pub_semver 1.4.4
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
watcher 0.9.7+15
yaml 2.2.1
Dev dependencies
flutter_test