A simple AR Plugin which allows you to place Flutter Widget in AR. This plugin uses Mind AR to work with AR.
- Allows to Place Flutter widget on Top of target.
- Allows to place GLB/GLTF Models.
ImageARWidget(
/// Your Target File.
/// For this example scan any flutter logo
targetDB: TargetDB.network("https://puzzlehack.b-cdn.net/targets.mind"),
tagets: [
ImageTarget(
targetIndex: 0,
children: [
/// Your Widget.
WidgetTargetNode.child(
child: Container(
color: Colors.pink.withOpacity(0.5),
child: const Center(
child: Text("Hello World"),
),
),
),
/// Your Target Model.
ModelTargetNode(
modelUrl: "https://puzzlehack.b-cdn.net/cube_grassland.glb",
position: const TransformPosition(0.5, -0.5),
scale: const TransformScale(0.4, 0.4, 0.4),
rotation: const TransformRotation(90, 0, 0)),
],
),
/// Works with Multiple Target as well
ImageTarget(
targetIndex: 1,
position: const TransformPosition(
0,
0,
),
children: [
WidgetTargetNode.child(
child: Container(
color: Colors.purple,
child: const Center(
child: Text("Hello World Index 2"),
),
),
),
],
),
],
);
- Models will always lies below Widget.
.asset()
works only for android. For iOS you need to use.network()
constructor for Target DB.
- Support Loading asset files in iOS,
- Provide Dart based implementation