-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update UI styling and transition routines
Modified various styles in carp_study_style.dart, making study name text more prominent. Updated Scaffold provision in message_details_page.dart for safety areas. Changed the ScrollView to ListView in multiple pages. Updated the messages' display method to use ListView.builder in study_page.dart. Simplified the structure of the DetailsBanner widget in details_banner.dart, removing some unused properties.
- Loading branch information
1 parent
2c181af
commit f287885
Showing
5 changed files
with
86 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,43 @@ | ||
part of carp_study_app; | ||
|
||
class DetailsBanner extends StatelessWidget { | ||
const DetailsBanner(this.title, this.imagePath, | ||
{super.key, this.isCarpBanner = false}); | ||
const DetailsBanner(this.title, this.imagePath, {super.key}); | ||
final String title; | ||
final String? imagePath; | ||
final bool isCarpBanner; | ||
|
||
@override | ||
Widget build( | ||
BuildContext context, | ||
) { | ||
RPLocalizations locale = RPLocalizations.of(context)!; | ||
return SliverAppBar( | ||
expandedHeight: 150.0, | ||
backgroundColor: Theme.of(context).colorScheme.secondary, | ||
floating: false, | ||
pinned: false, | ||
flexibleSpace: FlexibleSpaceBar( | ||
centerTitle: true, | ||
titlePadding: const EdgeInsets.only(top: 15), | ||
background: imagePath != null && imagePath!.isNotEmpty | ||
? ClipRRect( | ||
child: ImageFiltered( | ||
imageFilter: ui.ImageFilter.blur(sigmaX: 1, sigmaY: 1), | ||
child: bloc.data.studyPageViewModel | ||
.getMessageImage(imagePath)), | ||
) | ||
: const SizedBox.shrink(), | ||
title: InkWell( | ||
onTap: () { | ||
if (isCarpBanner) { | ||
context.push('/studyDetails'); | ||
} | ||
}, | ||
child: Padding( | ||
padding: const EdgeInsets.all(10), | ||
child: Stack( | ||
alignment: AlignmentDirectional.bottomEnd, | ||
children: [ | ||
Stack( | ||
children: [ | ||
Text( | ||
locale.translate(title), | ||
style: studyNameStyle.copyWith( | ||
// color: Theme.of(context).primaryColor, | ||
foreground: Paint() | ||
..style = PaintingStyle.stroke | ||
..strokeWidth = 1 | ||
..color = Theme.of(context).colorScheme.secondary), | ||
), | ||
Text( | ||
locale.translate(title), | ||
style: studyNameStyle.copyWith( | ||
color: Theme.of(context).primaryColor), | ||
), | ||
], | ||
), | ||
isCarpBanner | ||
? Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
crossAxisAlignment: CrossAxisAlignment.end, | ||
children: [ | ||
Icon(Icons.touch_app, | ||
color: Theme.of(context).primaryColor, size: 15), | ||
], | ||
) | ||
: const SizedBox.shrink(), | ||
], | ||
), | ||
return Column( | ||
// crossAxisAlignment: CrossAxisAlignment.start, | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
// only show this widget if there is an image = imagePath is not null and not empty | ||
if (imagePath != null && imagePath!.isNotEmpty) | ||
SizedBox( | ||
height: 300, | ||
child: bloc.data.studyPageViewModel.getMessageImage(imagePath), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(16), | ||
child: Stack( | ||
alignment: AlignmentDirectional.bottomEnd, | ||
children: [ | ||
Stack( | ||
children: [ | ||
Text( | ||
locale.translate(title), | ||
style: studyNameStyle.copyWith( | ||
fontSize: 30, color: Theme.of(context).primaryColor), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |