Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
applicationId 'com.exptech.dpip'
minSdkVersion 26
targetSdkVersion 36
versionCode 300104004
versionCode 300104006
versionName flutterVersionName
multiDexEnabled true
resConfigs "en", "ko", "zh-rTW", "ja", "zh-rCN"
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
android:showWhenLocked="true"
android:turnScreenOn="true">
<meta-data
Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/res/values-sw600dp/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<style name="NormalTheme" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:screenOrientation">unspecified</item>
</style>
</resources>
131 changes: 67 additions & 64 deletions lib/app/home/_widgets/date_timeline_item.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:dpip/app/home/_widgets/mode_toggle_button.dart';
import 'package:dpip/utils/extensions/build_context.dart';
import 'package:dpip/widgets/responsive/responsive_container.dart';
import 'package:flutter/material.dart';

class DateTimelineItem extends StatelessWidget {
Expand Down Expand Up @@ -71,82 +72,84 @@ class DateTimelineItem extends StatelessWidget {

@override
Widget build(BuildContext context) {
return IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Stack(
alignment: Alignment.centerLeft,
children: [
Positioned(
left: 0,
top: first ? 21 : 0,
bottom: last ? null : 0,
height: last ? 21 : null,
child: Stack(
alignment: Alignment.center,
children: [
Positioned(top: 0, bottom: 0, width: 1, child: Container(color: context.colors.outlineVariant)),
SizedBox(
width: 42,
child: Container(
height: 8,
width: 8,
decoration: BoxDecoration(shape: BoxShape.circle, color: context.colors.outlineVariant),
return ResponsiveContainer(
child: IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Stack(
alignment: Alignment.centerLeft,
children: [
Positioned(
left: 0,
top: first ? 21 : 0,
bottom: last ? null : 0,
height: last ? 21 : null,
child: Stack(
alignment: Alignment.center,
children: [
Positioned(top: 0, bottom: 0, width: 1, child: Container(color: context.colors.outlineVariant)),
SizedBox(
width: 42,
child: Container(
height: 8,
width: 8,
decoration: BoxDecoration(shape: BoxShape.circle, color: context.colors.outlineVariant),
),
),
),
],
],
),
),
),
Padding(
padding: const EdgeInsets.only(top: 16, bottom: 8),
child: InkWell(
onTap: mode != null && onModeChanged != null ? () => _showModeMenu(context) : null,
borderRadius: BorderRadius.circular(8),
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: context.colors.secondaryContainer,
),
child: Row(
mainAxisSize: MainAxisSize.min,
spacing: 6,
children: [
if (mode != null) ...[
Icon(mode!.icon, size: 16, color: context.colors.onSecondaryContainer),
Padding(
padding: const EdgeInsets.only(top: 16, bottom: 8),
child: InkWell(
onTap: mode != null && onModeChanged != null ? () => _showModeMenu(context) : null,
borderRadius: BorderRadius.circular(8),
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: context.colors.secondaryContainer,
),
child: Row(
mainAxisSize: MainAxisSize.min,
spacing: 6,
children: [
if (mode != null) ...[
Icon(mode!.icon, size: 16, color: context.colors.onSecondaryContainer),
Text(
mode!.label,
style: context.theme.textTheme.labelMedium?.copyWith(
height: 1,
color: context.colors.onSecondaryContainer,
fontWeight: FontWeight.bold,
),
),
Container(
width: 1,
height: 12,
color: context.colors.onSecondaryContainer.withValues(alpha: 0.3),
),
],
Text(
mode!.label,
style: context.theme.textTheme.labelMedium?.copyWith(
date,
style: context.theme.textTheme.labelLarge?.copyWith(
height: 1,
color: context.colors.onSecondaryContainer,
fontWeight: FontWeight.bold,
),
),
Container(
width: 1,
height: 12,
color: context.colors.onSecondaryContainer.withValues(alpha: 0.3),
),
],
Text(
date,
style: context.theme.textTheme.labelLarge?.copyWith(
height: 1,
color: context.colors.onSecondaryContainer,
),
),
],
),
),
),
),
),
],
],
),
),
),
],
],
),
),
);
}
Expand Down
Loading
Loading