screenwidgetplugin 0.0.1 screenwidgetplugin: ^0.0.1 copied to clipboard
A new Flutter plugin.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:screenwidgetplugin/screenwidgetplugin.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
List<Map> targets = [
{'heading': 'Clear my room', 'content': 'Nothing'},
{'heading': 'Finish homework', 'content': 'Special: physics'},
{'heading': 'Play game with honey', 'content': 'Nothing'},
];
@override
void initState() {
super.initState();
initPlatformState();
}
Future<void> initPlatformState() async {
bool rs = await Screenwidgetplugin.pourTargets(targets);
if(rs) print('success');
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin'),
),
body: Center(
child: Text('Running on android'),
),
),
);
}
}