-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Need HELP] How to update the content of floatingChild #8
Comments
Yes, this is probably not actually in the same scope as the Little example: import 'package:flutter/material.dart';
void main() => runApp(
const MaterialApp(
home: MyHomePage(),
),
);
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
ValueNotifier<int> _counter = ValueNotifier<int>(0);
void _incrementCounter() {
_counter.value++;
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Demo Home Page'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
'You have pushed the button this many times:',
),
ValueListenableBuilder(
valueListenable: _counter,
builder: (context, value, _) {
return Text(
'$value',
style: Theme.of(context).textTheme.headlineMedium,
);
}
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
} |
Please let me know if you were able to solve your problem! |
Thank you for providing such a useful plugin.
I want to know how to update the content of floatingChild:
Such as:
When str has changed and setstate has been called, the str in FloatingOverlay has not changed. The str display is updated only when resize or position is moved.
The text was updated successfully, but these errors were encountered: