Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed scrolling in meditation history dialog #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions lib/screens/Meditation_history_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class MeditationHistory extends StatefulWidget {
}

class _MeditationHistoryState extends State<MeditationHistory> {
Future<List<Map<String, dynamic>>>? history = MeditationHistoryStorage.getHistory();
Future<List<Map<String, dynamic>>>? history =
MeditationHistoryStorage.getHistory();

@override
Widget build(BuildContext context) {
Expand All @@ -22,29 +23,29 @@ class _MeditationHistoryState extends State<MeditationHistory> {
} else {
var meditationHistory = snapshot.data;
return Dialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
backgroundColor: Colors.black,
child: Stack(
children: [
SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Meditation History',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white,
),
Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Meditation History',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white,
),
const SizedBox(height: 16),
ListView.builder(
),
const SizedBox(height: 16),
Expanded(
child: ListView.builder(
itemCount: meditationHistory?.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemBuilder: (context, index) {
return Container(
margin: const EdgeInsets.only(bottom: 8),
Expand Down Expand Up @@ -89,8 +90,8 @@ class _MeditationHistoryState extends State<MeditationHistory> {
);
},
),
],
),
),
],
),
),
Positioned(
Expand All @@ -108,4 +109,4 @@ class _MeditationHistoryState extends State<MeditationHistory> {
},
);
}
}
}