diff --git a/sojorn_app/lib/screens/compose/video_editor_screen.dart b/sojorn_app/lib/screens/compose/video_editor_screen.dart index 87fb899..ad240bc 100644 --- a/sojorn_app/lib/screens/compose/video_editor_screen.dart +++ b/sojorn_app/lib/screens/compose/video_editor_screen.dart @@ -11,6 +11,7 @@ import 'package:ffmpeg_kit_flutter_new/return_code.dart'; import '../../models/sojorn_media_result.dart'; import '../../theme/app_theme.dart'; +import '../../theme/tokens.dart'; /// Sojorn Video Editor with basic trimming and FFmpeg export /// Implements video editing with H.264 codec support via FFmpeg @@ -229,7 +230,7 @@ class _sojornVideoEditorState extends State { if (!_isExporting) return const SizedBox.shrink(); return Container( - color: Colors.black54, + color: const Color(0x8A000000), child: Center( child: Column( mainAxisSize: MainAxisSize.min, @@ -241,7 +242,7 @@ class _sojornVideoEditorState extends State { const SizedBox(height: 16), Text( _exportStatus.isNotEmpty ? _exportStatus : 'Exporting...', - style: const TextStyle(color: Colors.white), + style: const TextStyle(color: SojornColors.basicWhite), ), ], ), @@ -338,15 +339,15 @@ class _sojornVideoEditorState extends State { children: [ Text( 'Start: ${_startTrim.inSeconds}s', - style: GoogleFonts.inter(color: Colors.white70), + style: GoogleFonts.inter(color: SojornColors.basicWhite.withValues(alpha: 0.7)), ), Text( 'End: ${_endTrim.inSeconds}s', - style: GoogleFonts.inter(color: Colors.white70), + style: GoogleFonts.inter(color: SojornColors.basicWhite.withValues(alpha: 0.7)), ), Text( 'Duration: ${trimDuration.inSeconds}s', - style: GoogleFonts.inter(color: Colors.white70), + style: GoogleFonts.inter(color: SojornColors.basicWhite.withValues(alpha: 0.7)), ), ], ), @@ -354,7 +355,7 @@ class _sojornVideoEditorState extends State { SliderTheme( data: SliderTheme.of(context).copyWith( activeTrackColor: _brightNavy, - inactiveTrackColor: Colors.white24, + inactiveTrackColor: SojornColors.basicWhite.withValues(alpha: 0.24), thumbColor: _brightNavy, overlayColor: _brightNavy.withOpacity(0.2), trackHeight: 4, @@ -387,7 +388,7 @@ class _sojornVideoEditorState extends State { }, icon: Icon( _isTrimming ? Icons.check : Icons.edit, - color: _isTrimming ? _brightNavy : Colors.white70, + color: _isTrimming ? _brightNavy : SojornColors.basicWhite.withValues(alpha: 0.7), ), tooltip: _isTrimming ? 'Finish Trimming' : 'Enable Trimming', ), @@ -399,7 +400,7 @@ class _sojornVideoEditorState extends State { _endTrim = duration; }); }, - icon: Icon(Icons.restore, color: Colors.white70), + icon: Icon(Icons.restore, color: SojornColors.basicWhite.withValues(alpha: 0.7)), tooltip: 'Reset Trim', ), ], @@ -413,20 +414,20 @@ class _sojornVideoEditorState extends State { // For web or bytes, show placeholder if (kIsWeb || widget.videoBytes != null) { return Scaffold( - backgroundColor: _matteBlack, + backgroundColor: SojornColors.matteBlack, appBar: AppBar( - backgroundColor: _matteBlack, - foregroundColor: Colors.white, + backgroundColor: SojornColors.matteBlack, + foregroundColor: SojornColors.basicWhite, leading: IconButton( tooltip: 'Cancel', icon: const Icon(Icons.close), - onPressed: _isExporting ? null : () => Navigator.pop(context), + onPressed: () => Navigator.of(context).pop(), ), actions: [ TextButton( onPressed: _isExporting ? null : _saveWithoutEditing, style: TextButton.styleFrom( - foregroundColor: _brightNavy, + foregroundColor: SojornColors.brightNavy, ), child: _isExporting ? const SizedBox( @@ -434,7 +435,7 @@ class _sojornVideoEditorState extends State { height: 16, child: CircularProgressIndicator( strokeWidth: 2, - valueColor: AlwaysStoppedAnimation(Colors.white), + valueColor: AlwaysStoppedAnimation(SojornColors.basicWhite), ), ) : const Text('Save'), @@ -449,7 +450,7 @@ class _sojornVideoEditorState extends State { Icon( Icons.video_library, size: 64, - color: _brightNavy, + color: SojornColors.brightNavy, ), const SizedBox(height: 24), Padding( @@ -459,7 +460,7 @@ class _sojornVideoEditorState extends State { style: GoogleFonts.inter( fontSize: 24, fontWeight: FontWeight.w600, - color: Colors.white, + color: SojornColors.basicWhite, ), textAlign: TextAlign.center, ), @@ -471,7 +472,7 @@ class _sojornVideoEditorState extends State { 'Video editing is not supported on web yet.\nYour video will be saved without editing.', style: GoogleFonts.inter( fontSize: 14, - color: Colors.white70, + color: SojornColors.basicWhite.withValues(alpha: 0.7), ), textAlign: TextAlign.center, ), @@ -483,8 +484,8 @@ class _sojornVideoEditorState extends State { label: Text( _isExporting ? 'Processing...' : 'Continue with Video'), style: ElevatedButton.styleFrom( - backgroundColor: _brightNavy, - foregroundColor: Colors.white, + backgroundColor: SojornColors.brightNavy, + foregroundColor: SojornColors.basicWhite, padding: const EdgeInsets.symmetric( horizontal: 32, vertical: 16, @@ -500,18 +501,18 @@ class _sojornVideoEditorState extends State { // Show loading state if (_isLoading) { return Scaffold( - backgroundColor: _matteBlack, + backgroundColor: SojornColors.matteBlack, body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ CircularProgressIndicator( - color: _brightNavy, + color: SojornColors.brightNavy, ), const SizedBox(height: 16), const Text( 'Initializing editor...', - style: TextStyle(color: Colors.white), + style: TextStyle(color: SojornColors.basicWhite), ), ], ), @@ -522,10 +523,10 @@ class _sojornVideoEditorState extends State { // Show error state if initialization failed if (!_isInitialized) { return Scaffold( - backgroundColor: _matteBlack, + backgroundColor: SojornColors.matteBlack, appBar: AppBar( backgroundColor: _matteBlack, - foregroundColor: Colors.white, + foregroundColor: SojornColors.basicWhite, leading: IconButton( tooltip: 'Cancel', icon: const Icon(Icons.close), @@ -549,7 +550,7 @@ class _sojornVideoEditorState extends State { style: GoogleFonts.inter( fontSize: 20, fontWeight: FontWeight.w600, - color: Colors.white, + color: SojornColors.basicWhite, ), textAlign: TextAlign.center, ), @@ -561,7 +562,7 @@ class _sojornVideoEditorState extends State { 'Please try again or use a different video', style: GoogleFonts.inter( fontSize: 14, - color: Colors.white70, + color: SojornColors.basicWhite.withValues(alpha: 0.7), ), textAlign: TextAlign.center, ), @@ -573,7 +574,7 @@ class _sojornVideoEditorState extends State { label: const Text('Save Original Video'), style: ElevatedButton.styleFrom( backgroundColor: _brightNavy, - foregroundColor: Colors.white, + foregroundColor: SojornColors.basicWhite, padding: const EdgeInsets.symmetric( horizontal: 32, vertical: 16, @@ -591,7 +592,7 @@ class _sojornVideoEditorState extends State { backgroundColor: _matteBlack, appBar: AppBar( backgroundColor: _matteBlack, - foregroundColor: Colors.white, + foregroundColor: SojornColors.basicWhite, leading: IconButton( tooltip: 'Cancel', icon: const Icon(Icons.close), @@ -609,7 +610,7 @@ class _sojornVideoEditorState extends State { height: 16, child: CircularProgressIndicator( strokeWidth: 2, - valueColor: AlwaysStoppedAnimation(Colors.white), + valueColor: AlwaysStoppedAnimation(SojornColors.basicWhite), ), ) : const Text('Save'), @@ -635,7 +636,7 @@ class _sojornVideoEditorState extends State { Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.white.withOpacity(0.05), + color: SojornColors.basicWhite.withValues(alpha: 0.05), borderRadius: BorderRadius.circular(8), ), child: Row( @@ -643,7 +644,7 @@ class _sojornVideoEditorState extends State { children: [ Text( 'Original: ${_videoController!.value.duration.inSeconds}s', - style: GoogleFonts.inter(color: Colors.white70), + style: GoogleFonts.inter(color: SojornColors.basicWhite.withValues(alpha: 0.7)), ), Text( 'Trimmed: ${(_endTrim - _startTrim).inSeconds}s', @@ -651,7 +652,7 @@ class _sojornVideoEditorState extends State { color: (_endTrim - _startTrim) < _videoController!.value.duration ? _brightNavy - : Colors.white70, + : SojornColors.basicWhite.withValues(alpha: 0.7), fontWeight: FontWeight.w600, ), ), diff --git a/sojorn_app/lib/screens/quips/create/quip_editor_screen.dart b/sojorn_app/lib/screens/quips/create/quip_editor_screen.dart index d9f5982..28c946a 100644 --- a/sojorn_app/lib/screens/quips/create/quip_editor_screen.dart +++ b/sojorn_app/lib/screens/quips/create/quip_editor_screen.dart @@ -8,6 +8,7 @@ import '../../../services/api_service.dart'; import '../../../models/sojorn_media_result.dart'; import '../../../providers/api_provider.dart'; +import '../../../theme/tokens.dart'; import '../../../services/image_upload_service.dart'; import '../../../theme/app_theme.dart'; import '../../compose/video_editor_screen.dart'; @@ -159,7 +160,7 @@ class _QuipEditorScreenState extends ConsumerState { backgroundColor: const Color(0xFF0B0B0B), appBar: AppBar( backgroundColor: const Color(0xFF0B0B0B), - foregroundColor: Colors.white, + foregroundColor: SojornColors.basicWhite, title: const Text('Create Quip'), actions: [ if (!videoDurationOk) @@ -187,7 +188,7 @@ class _QuipEditorScreenState extends ConsumerState { Expanded( child: Container( decoration: BoxDecoration( - color: Colors.black, + color: SojornColors.basicBlack, borderRadius: BorderRadius.circular(16), border: Border.all( color: AppTheme.brightNavy.withOpacity(0.3), @@ -206,7 +207,7 @@ class _QuipEditorScreenState extends ConsumerState { const SizedBox(height: 16), Text( 'Video Duration: ${widget.originalDuration.inSeconds}s', - style: const TextStyle(color: Colors.white70), + style: TextStyle(color: SojornColors.basicWhite.withValues(alpha: 0.7)), ), if (!videoDurationOk) ...[ const SizedBox(height: 8), @@ -243,17 +244,17 @@ class _QuipEditorScreenState extends ConsumerState { controller: _captionController, maxLines: 2, maxLength: 150, - style: const TextStyle(color: Colors.white), + style: const TextStyle(color: SojornColors.basicWhite), decoration: InputDecoration( hintText: 'Add a caption (optional)', - hintStyle: const TextStyle(color: Colors.white54), + hintStyle: TextStyle(color: SojornColors.basicWhite.withValues(alpha: 0.54)), filled: true, - fillColor: Colors.white.withOpacity(0.08), + fillColor: SojornColors.basicWhite.withValues(alpha: 0.08), border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide.none, ), - counterStyle: const TextStyle(color: Colors.white54), + counterStyle: TextStyle(color: SojornColors.basicWhite.withValues(alpha: 0.54)), ), ), const SizedBox(height: 16), @@ -278,7 +279,7 @@ class _QuipEditorScreenState extends ConsumerState { Expanded( child: Text( _statusMessage!, - style: const TextStyle(color: Colors.white70), + style: TextStyle(color: SojornColors.basicWhite.withValues(alpha: 0.7)), ), ), ], @@ -292,7 +293,7 @@ class _QuipEditorScreenState extends ConsumerState { label: Text(_isUploading ? 'Uploading...' : 'Post Quip'), style: ElevatedButton.styleFrom( backgroundColor: AppTheme.brightNavy, - foregroundColor: Colors.white, + foregroundColor: SojornColors.basicWhite, padding: const EdgeInsets.symmetric(vertical: 16), disabledBackgroundColor: AppTheme.brightNavy.withOpacity(0.5), ),