simbadan 0.0.2 copy "simbadan: ^0.0.2" to clipboard
simbadan: ^0.0.2 copied to clipboard

outdated

A private flutter plugin.

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  TextEditingController numberToDialController = TextEditingController();
  TextEditingController carrierController = TextEditingController();

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

  getCarriers() async {
    var carriers = await Simbadan.getCarriers();

    print(carriers);
  }

  dialByCarrier() {
    var numberToDial = numberToDialController.text;
    var carrier = carrierController.text;
    Simbadan.dialByCarrier(numberToDial, carrier);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            RaisedButton(
                child: Text("getCarriers()"), onPressed: () => getCarriers()),
            TextField(
              decoration: InputDecoration(labelText: "numberToDial"),
              controller: numberToDialController,
            ),
            TextField(
              decoration: InputDecoration(labelText: "carrier"),
              controller: carrierController,
            ),
            RaisedButton(
                child: Text("dialByCarrier()"),
                onPressed: () => dialByCarrier()),
          ],
        ),
      ),
    );
  }
}
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A private flutter plugin.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on simbadan