minilikewallet 0.0.4
minilikewallet: ^0.0.4 copied to clipboard

A new Flutter plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:global_configuration/global_configuration.dart';
import 'package:minilikewallet/first_page/first_page.dart';

void main() async {
  try {
    await GlobalConfiguration()
        .loadFromUrl("https://new.likepoint.io/configAPI");
  } catch (e) {
    print(e);
    // something went wrong while fetching the config from the url ... do something
  }
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Test",
      home: TestPage(),
    );
  }
}

class TestPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.cyanAccent,
      appBar: AppBar(title: Text("Test")),
      body: Container(
        color: Colors.amberAccent.withOpacity(0.7),
        child: Center(
          child: RaisedButton(
            color: Colors.redAccent,
            textColor: Colors.white,
            onPressed: () {
              showDialog(
                  context: context,
                  barrierColor: Colors.transparent,
                  builder: (BuildContext context) {
                    return FirstPage(
                      phone: '',
                    );
                  });
            },
          ),
        ),
      ),
    );
  }
}