tradein_plugin 0.0.5 copy "tradein_plugin: ^0.0.5" to clipboard
tradein_plugin: ^0.0.5 copied to clipboard

outdated

Trade in plug in package is for usage of native modules like android and ios code are using in flutter app

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:tradein_plugin/tradein_plugin.dart';

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

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

class _MyAppState extends State<MyApp> {
  List<Map<String,dynamic>> arr = [
    {
      'name':'man',
      'age':28
    },
    {
      'name':'ram',
      'age':34
    },
  ];

  Map<String,dynamic> json = {
    'name':'man',
    'age':28
  };


  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Trade In Plugin example app'),
        ),
          body: Center(child: Column(children: <Widget>[
            Container(
              margin: EdgeInsets.all(25),
              child: FlatButton(
                child: Text('Welcome To Trade In Host App', style: TextStyle(fontSize: 20.0),),
                onPressed: () {},
              ),
            ),
            Container(
              margin: EdgeInsets.all(25),
              child: FlatButton(
                child: Text('Trade In', style: TextStyle(fontSize: 20.0),),
                color: Colors.blueAccent,
                textColor: Colors.white,
                onPressed: _showNativeView,
              ),
            ),
          ]
          )),
      ),
    );
  }

  Future<Null> _showNativeView() async {
    TradeinPlugin.loadTradinPluginSDK();
  }
}
0
likes
0
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Trade in plug in package is for usage of native modules like android and ios code are using in flutter app

Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on tradein_plugin

Packages that implement tradein_plugin