ref 0.0.1 copy "ref: ^0.0.1" to clipboard
ref: ^0.0.1 copied to clipboard

outdated

A Flutter mvvm plugin.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'mvvm.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(routes: {
      '/mvvm': (BuildContext context) => Mvvm(),
    }, home: HomePage());
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            children: [
              SizedBox(height: 80),
              ElevatedButton(
                onPressed: () {
                  Navigator.pushNamed(context, '/mvvm');
                },
                child: Text(
                  '跳转到响应式页面',
                  style: TextStyle(fontSize: 20),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
0
points
34
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter mvvm plugin.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on ref

Packages that implement ref