flutter_assets_generator 0.0.6 flutter_assets_generator: ^0.0.6 copied to clipboard
Automatically generate a resource file by scanning pubspec.yaml to correspond to the flutter's asset, imitation R file short name.
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(home: MyHomePage());
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('测试')),
body: const Center(
child: Text('测试'),
),
);
}
}