From d7769061c5214a2d015d6941ec0390facef91104 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Tue, 16 May 2023 08:52:29 -0600 Subject: [PATCH] added keyboard dismisser --- lib/main.dart | 25 ++++++++++++------------- pubspec.yaml | 1 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index b58b6a4..7edb399 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,10 +1,7 @@ -import 'dart:io'; - -import 'package:drifter/pages/main_screen/main_screen_widget.dart'; import 'package:drifter/pages/splash_screen/splash_screen.dart'; import 'package:drifter/theme/app_colors.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:keyboard_dismisser/keyboard_dismisser.dart'; void main() { runApp(const MyApp()); @@ -15,17 +12,19 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - appBarTheme: const AppBarTheme(backgroundColor: AppColors.background), - bottomNavigationBarTheme: const BottomNavigationBarThemeData( - backgroundColor: AppColors.background, - selectedItemColor: AppColors.mainAccent, - unselectedItemColor: Colors.grey, + return KeyboardDismisser( + child: MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + appBarTheme: const AppBarTheme(backgroundColor: AppColors.background), + bottomNavigationBarTheme: const BottomNavigationBarThemeData( + backgroundColor: AppColors.background, + selectedItemColor: AppColors.mainAccent, + unselectedItemColor: Colors.grey, + ), ), + home: const Splash(), ), - home: const Splash(), ); } } diff --git a/pubspec.yaml b/pubspec.yaml index b75e843..c0dad3b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,6 +34,7 @@ dependencies: nostr_tools: ^1.0.7 flutter_secure_storage: ^8.0.0 flutter_svg: ^2.0.5 + keyboard_dismisser: ^3.0.0 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons.