diff --git a/lib/main.dart b/lib/main.dart index 2f920d1..abfa449 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -52,20 +52,29 @@ class _BaseState extends State { final screenHeight = MediaQuery.of(context).size.height; final screenWidth = MediaQuery.of(context).size.width; return MaterialApp( - title: "APJ Abdul Kalam Technological University", - debugShowCheckedModeBanner: false, - theme: ThemeData( - scaffoldBackgroundColor: Colors.white, - textTheme: GoogleFonts.latoTextTheme(), - ), - home: ColorFiltered( - colorFilter: mat, - child: Scaffold( - appBar: PreferredSize( - preferredSize: Size.fromHeight( - screenWidth > 850 ? 53 : screenHeight * 0.15), - child: Appbar(filter: updateColorFilter)), - body: screenWidth > 850 ? const AppBody() : const MobileBody()), - )); + title: "APJ Abdul Kalam Technological University", + debugShowCheckedModeBanner: false, + theme: ThemeData( + scaffoldBackgroundColor: Colors.white, + textTheme: GoogleFonts.latoTextTheme(), + ), + home: ColorFiltered( + colorFilter: mat, + child: Scaffold( + appBar: PreferredSize( + preferredSize: Size.fromHeight( + screenWidth > 850 ? 53 : screenHeight * 0.15), + child: Appbar(filter: updateColorFilter)), + body: isDesktopViewEnabled(context) + ? const AppBody() + : const MobileBody()), + ), + ); } } + +bool isDesktopViewEnabled(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + double devicePixelRatio = MediaQuery.of(context).devicePixelRatio; + return (screenWidth / devicePixelRatio) > 850; +} diff --git a/pubspec.lock b/pubspec.lock index bed7203..a9cc58b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -256,14 +256,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - responsive_framework: - dependency: "direct main" - description: - name: responsive_framework - sha256: a8e1c13d4ba980c60cbf6fa1e9907cd60662bf2585184d7c96ca46c43de91552 - url: "https://pub.dev" - source: hosted - version: "1.5.1" sky_engine: dependency: transitive description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 0386be5..832c705 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: ktu_results -description: "A new Flutter project." +description: "APJ Abdul Kalam Technological University" publish_to: 'none' version: 1.0.0+1 @@ -14,7 +14,6 @@ dependencies: font_awesome_flutter: ^10.7.0 google_fonts: ^6.2.1 http: ^1.2.2 - responsive_framework: ^1.5.1 url_launcher: ^6.3.0 dev_dependencies: