fixes for Android transparency and add removeAsset method

This commit is contained in:
Nick Fisher
2022-07-11 19:12:49 +10:00
parent f65c7ab50b
commit e3ab9ced81
10 changed files with 139 additions and 500 deletions

View File

@@ -28,16 +28,16 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
color: Colors.transparent,
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
backgroundColor: Colors.transparent,
body: Column(children: [
SizedBox(
Expanded(child:SizedBox(
height:200, width:200,
child:FilamentWidget(
controller: _filamentController,
)),
))),
Expanded(
child: Wrap(
alignment: WrapAlignment.end,
@@ -63,6 +63,12 @@ class _MyAppState extends State<MyApp> {
await _filamentController.loadGltf(
'assets/FlightHelmet/FlightHelmet.gltf', 'assets/FlightHelmet');
}),
ElevatedButton(
child: const Text('remove asset'),
onPressed: () async {
await _filamentController
.removeAsset();
}),
ElevatedButton(
child: const Text('set all weights to 1'),
onPressed: () async {