We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
有木有用 screenutil 写 widget tests 的例子吗?
The text was updated successfully, but these errors were encountered:
如果有人有同样的问题,并看到此
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class _Wrapper extends StatelessWidget { final Widget child; _Wrapper(this.child); @override Widget build(BuildContext context) { ScreenUtil.init(context, width: 1125, height: 2436, allowFontScaling: true); return child; } } Widget testableWidget({Widget child}) { return MediaQuery( data: MediaQueryData(), child: CupertinoApp( home: Scaffold(body: _Wrapper(child)), ), ); } void main() { testWidgets('testingMyWidget', (WidgetTester tester) async { await tester.pumpWidget(testableWidget(child: MyWidget())); }); }
Sorry, something went wrong.
No branches or pull requests
有木有用 screenutil 写 widget tests 的例子吗?
The text was updated successfully, but these errors were encountered: