Created
June 14, 2022 09:34
-
-
Save alperefesahin/bb9af899569f6f36948b4a02501b2e6e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:io'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:sizer/sizer.dart'; | |
| import 'package:todo_list_riverpod/presentation/pages/home_page/home_page.dart'; | |
| class AppWidget extends StatelessWidget { | |
| const AppWidget({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Sizer( | |
| builder: (context, orientation, deviceType) { | |
| return Listener( | |
| onPointerUp: (_) { | |
| if (Platform.isIOS) { | |
| FocusScopeNode currentFocus = FocusScope.of(context); | |
| if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) { | |
| FocusManager.instance.primaryFocus!.unfocus(); | |
| } | |
| } | |
| }, | |
| child: const MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| home: HomePage(), | |
| ), | |
| ); | |
| }, | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment