Comments (2)
Thanks for the report @MilanVilov
I tried to use the code sample by removing third party package implementation but it seems to give me below error:
runnable code sample
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
//import 'package:protokol_app/app/widgets/full_screen_circular_progress_indicator.dart';
//import 'package:protokol_app/app/widgets/wizard_button.dart';
void main() {
runApp(MaterialApp(
home: SupportAndFeedback(),
));
}
class SupportAndFeedback extends StatefulWidget {
@override
SupportAndFeedbackState createState() => SupportAndFeedbackState();
}
class SupportAndFeedbackState extends State<SupportAndFeedback> {
final _messageController = TextEditingController();
bool _isLoading = false;
@override
void initState() {
super.initState();
}
@override
void dispose() {
_messageController.dispose();
super.dispose();
}
void _navigateToLandingScreen() {
Navigator.pop(context, true);
}
void _handleSendButtonPressed() {
setState(() {
_isLoading = true;
});
// Simulate a delay of 1 second using a Future
Future.delayed(Duration(seconds: 1), () {
setState(() {
_isLoading = false;
});
_navigateToLandingScreen();
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: true,
appBar: AppBar(
backgroundColor: Colors.white,
centerTitle: true,
title: Text(
FlutterI18n.translate(context, 'support_and_feedback'),
style: Theme.of(context).textTheme.titleMedium,
),
leading: IconButton(
icon: const Icon(Icons.close),
color: Colors.black,
onPressed: () {
Navigator.pop(context);
},
),
elevation: 0,
),
body: _isLoading
? CircularProgressIndicator()
: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
style: Theme.of(context).textTheme.bodyMedium,
controller: _messageController,
decoration: InputDecoration(
hintText: FlutterI18n.translate(context, 'enter_message'),
border: InputBorder.none,
contentPadding: const EdgeInsets.all(0),
),
maxLines: 12,
maxLength: 500,
keyboardType: TextInputType.multiline,
),
],
),
),
floatingActionButton: _isLoading
? null
: WizardButton(
text: FlutterI18n.translate(context, 'send'),
onPressed: _handleSendButtonPressed,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
);
}
}
class WizardButton extends StatefulWidget {
final VoidCallback onPressed;
final String? text;
const WizardButton({Key? key, required this.onPressed, this.text})
: super(key: key);
@override
_WizardButtonState createState() => _WizardButtonState();
}
class _WizardButtonState extends State<WizardButton> {
@override
Widget build(BuildContext context) {
double screenWidth = MediaQuery.of(context).size.width;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: SizedBox(
width: screenWidth - 32,
height: 56,
child: FloatingActionButton(
onPressed: widget.onPressed,
backgroundColor: Colors.black,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
child: Text(
widget.text == null
? FlutterI18n.translate(context, 'next')
: widget.text!,
style: Theme.of(context).textTheme.titleMedium!.copyWith(
color: Colors.white,
))),
),
);
}
}
Please check the same and provide only minimal but complete runnable code to verify this further.
Also, is this only occuring on simulators only or on physical device too ?
from flutter.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
from flutter.
Related Issues (20)
- Flutter 3.22 different behavior between debug and release mode HOT 8
- Mac_pixel_7pro native_assets_android is 2.02% flaky HOT 3
- Mac framework_tests_impeller is 2.02% flaky HOT 1
- [go_router]: Focus traversal issues in nested navigators HOT 3
- simulateKeyDownEvent ENTER throwing exception in integration tests Desktop HOT 7
- Is there a way to make the version and build number in `macos/Runner.xcworkspace` automatically match the version and build number from `pubspec.yaml`? HOT 2
- Support Full Keyboard Access on iOS for keyboard navigation events HOT 1
- Tooltip getTransformTo assertion failed when in OverlayPortal.targetsRootOverlay HOT 1
- Unclear Error message: Error: The pod "Firebase/Analytics" required by the plugin "firebase_analytics" requires a higher minimum iOS deployment version than the plugin's reported minimum version. HOT 5
- [iOS] BoxShadow flickers when scrolling HOT 1
- Flutter Assertion Error HOT 1
- Flutter build with 3.22 for iOS failing: The method 'scheduleWarmUpFrame' isn't defined for the class 'PlatformDispatcher'. HOT 8
- while migrating from SurfaceTextureEntry to SurfaceProducer, setOnFrameAvailableListener is not found HOT 5
- mac-8 and mac-9 low on disk space. HOT 1
- Rewrite `et` test-fixtures not to use global data
- mac-7 and mac-28 lost external connection from device phone. HOT 1
- flutter build web: allow passing experiment flags HOT 3
- No way to resolve name collisions with SwiftPM
- dart-sdk-darwin-arm64.zip not exist!
- win-1 is dead.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.