Skip to content

Commit

Permalink
Fixed #275 on Render overflow in home_view.dart drawer (#276)
Browse files Browse the repository at this point in the history
* Fixed #275 on Render overflow in home_view.dart drawer

* Removed the Gap and used SizedBox instead
  • Loading branch information
WrathOP authored Dec 29, 2023
1 parent 42ad575 commit ca83408
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
43 changes: 27 additions & 16 deletions lib/app/modules/home/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

import 'package:get/get.dart';
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
import 'package:ultimate_alarm_clock/app/data/models/alarm_model.dart';
Expand All @@ -21,6 +22,7 @@ class HomeView extends GetView<HomeController> {
HomeView({Key? key}) : super(key: key);
ThemeController themeController = Get.find<ThemeController>();
SettingsController settingsController = Get.find<SettingsController>();

@override
Widget build(BuildContext context) {
AboutController aboutController = Get.put(AboutController());
Expand Down Expand Up @@ -307,19 +309,25 @@ class HomeView extends GetView<HomeController> {
child: Column(
children: [
DrawerHeader(
decoration: const BoxDecoration(color: kLightSecondaryColor),
child: Center(
child: Row(
children: [
const CircleAvatar(
radius: 30,
backgroundImage: AssetImage(
'assets/images/ic_launcher-playstore.png',
)),
const SizedBox(
width: 10,
decoration: const BoxDecoration(color: kLightSecondaryColor),
child: Center(
child: Row(
children: [
const Flexible(
flex: 1,
child: CircleAvatar(
radius: 30,
backgroundImage: AssetImage(
'assets/images/ic_launcher-playstore.png',
),
),
Column(
),
const SizedBox(
width: 10,
),
Flexible(
flex: 3,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
Expand Down Expand Up @@ -354,9 +362,11 @@ class HomeView extends GetView<HomeController> {
),
],
),
],
),
)),
),
],
),
),
),
ListTile(
onTap: () {
Utils.hapticFeedback();
Expand Down Expand Up @@ -1003,7 +1013,8 @@ class HomeView extends GetView<HomeController> {
Text(
alarm.label,
overflow:
TextOverflow.ellipsis, // Set overflow property here
TextOverflow.ellipsis,
// Set overflow property here
style: Theme.of(context).textTheme.bodySmall!.copyWith(
fontWeight: FontWeight.w500,
color: alarm.isEnabled == true
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies:
path_provider: ^2.1.1
audio_session: ^0.1.18


dev_dependencies:
flutter_lints: ^2.0.3
isar_generator: ^3.1.0+1
Expand Down

0 comments on commit ca83408

Please sign in to comment.