优化
This commit is contained in:
@@ -237,7 +237,8 @@ class _FocusScreenState extends State<FocusScreen> with WidgetsBindingObserver {
|
||||
basePoints: pointsData['basePoints']!,
|
||||
honestyBonus: pointsData['honestyBonus']!,
|
||||
totalPoints: pointsData['totalPoints']!,
|
||||
newAchievements: pointsData['newAchievements'] as List<String>,
|
||||
newAchievements:
|
||||
pointsData['newAchievements'] as List<String>,
|
||||
encouragementService: widget.encouragementService,
|
||||
),
|
||||
),
|
||||
@@ -448,42 +449,30 @@ class _FocusScreenState extends State<FocusScreen> with WidgetsBindingObserver {
|
||||
backgroundColor: AppColors.background,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.2),
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.2),
|
||||
// Timer Display Component
|
||||
TimerDisplay(remainingSeconds: _remainingSeconds),
|
||||
|
||||
// Timer Display Component
|
||||
TimerDisplay(remainingSeconds: _remainingSeconds),
|
||||
const SizedBox(height: 80),
|
||||
|
||||
const SizedBox(height: 80),
|
||||
// "I got distracted" Button Component
|
||||
DistractionButton(
|
||||
onPressed: _showDistractionSheet,
|
||||
buttonText: l10n.iGotDistracted,
|
||||
),
|
||||
|
||||
// "I got distracted" Button Component
|
||||
DistractionButton(
|
||||
onPressed: _showDistractionSheet,
|
||||
buttonText: l10n.iGotDistracted,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Control Buttons Component
|
||||
ControlButtons(
|
||||
isPaused: _isPaused,
|
||||
onTogglePause: _togglePause,
|
||||
onStopEarly: _stopEarly,
|
||||
pauseText: l10n.pause,
|
||||
resumeText: l10n.resume,
|
||||
stopText: l10n.stopSession,
|
||||
),
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.2),
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.2),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Control Buttons Component
|
||||
ControlButtons(
|
||||
isPaused: _isPaused,
|
||||
onTogglePause: _togglePause,
|
||||
onStopEarly: _stopEarly,
|
||||
pauseText: l10n.pause,
|
||||
resumeText: l10n.resume,
|
||||
stopText: l10n.stopSession,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user