I have an AndroidView
class TextViewAndroid {
...
}
and I have a platform view that returns this view so
class TextPlatformView {
...
}
This class serves the PlatformView :
class TextView extends StatelessWidget {
const TextView({super.key});
@override
Widget build(BuildContext context) {
const String viewType = 'textView';
final Map<String, dynamic> creationParams = <String, dynamic>{};
return AndroidView(
viewType: viewType,
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
);
}
}
There are two screens on the flutter end. Each screen has one TextView
class FirstPage extends StatelessWidget {
const FirstPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('First Page'),
),
body: const Center(
child: TextView(),
),
);
}
}
class SecondPage extends StatelessWidget {
const SecondPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Second Page'),
),
body: const Center(
child: TextView(),
),
);
}
}
When I go from one screen to another screen and come back to the first I want to know the lifecycle method which is triggered for the TextViewAndroid on the first screen. Is there a way to know it?
I have an AndroidView
and I have a platform view that returns this view so
This class serves the
PlatformView:There are two screens on the flutter end. Each screen has one TextView
When I go from one screen to another screen and come back to the first I want to know the lifecycle method which is triggered for the
TextViewAndroidon the first screen. Is there a way to know it?