Skip to content

Commit

Permalink
responsive-trial
Browse files Browse the repository at this point in the history
  • Loading branch information
AthulNoobie committed Oct 31, 2024
1 parent 004fa06 commit 0ea5e07
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
39 changes: 24 additions & 15 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,29 @@ class _BaseState extends State<Base> {
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;
}
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 0ea5e07

Please sign in to comment.