50f56c5e1e
* Respect `RTCIceTransportPolicy` enum and organize * Simplify syntax where possible etc. * Combine `VideoPreset` and `VideoPresets` * Default values for `ConnectOptions` * Build URI instead of String manipulation * Slight modifications to Exception * `LiveKitTheme` for example * `VideoEncoding` class * Organize imports * First simulcast implementation * Remove unnecessary try-catches * Update Android settings * Remember uri and token * example improvements * `fit` parameter for VideoTrackRenderer * Simulcast option for example * Pass `defaultPublishOptions` * Show only `VideoQuality` * Pass tests * Better buildUri logic * Named parameter to positional * Explicit imports * `VideoParameter` instead of `VideoPreset` * Use `mediaTrack.getSettings` when possible * Safer dispose logic * Safer `PCTransport` Update transport.dart * Synchronized events for `SignalClient` * Use logger instead of print * Make example compile for iOS * First screen share implementation * Make example work with screen share * Example improvement * Code optimization * Don't depend on web_socket_channel * Fix: Unpublish track bug * Show participant mute state & identity * Update protos * Remote mute/unmute * iOS Background mode * Separate `createCameraTrack` and `createScreenTrack` * Clean up * PB fix * format * Fix analyzer warning * Android clean up * Update README.md * Clean up
66 lines
2.2 KiB
Dart
66 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
//
|
|
// Flutter has a color profile issue so colors will look different
|
|
// on Apple devices.
|
|
// https://github.com/flutter/flutter/issues/55092
|
|
// https://github.com/flutter/flutter/issues/39113
|
|
//
|
|
class LiveKitTheme {
|
|
//
|
|
final bgColor = Colors.black;
|
|
final textColor = Colors.white;
|
|
final cardColor = const Color(0xFF00163c);
|
|
final accentColor = const Color(0xFF2d6aef);
|
|
|
|
ThemeData buildThemeData(BuildContext ctx) => ThemeData(
|
|
backgroundColor: bgColor,
|
|
// accentColor: accentColor,
|
|
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue),
|
|
appBarTheme: AppBarTheme(
|
|
backgroundColor: cardColor,
|
|
),
|
|
cardColor: cardColor,
|
|
scaffoldBackgroundColor: bgColor,
|
|
canvasColor: bgColor,
|
|
iconTheme: IconThemeData(
|
|
color: textColor,
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ButtonStyle(
|
|
foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
|
|
// backgroundColor: MaterialStateProperty.all<Color>(accentColor),
|
|
backgroundColor: MaterialStateProperty.resolveWith((states) {
|
|
if (states.contains(MaterialState.disabled)) return accentColor.withOpacity(0.5);
|
|
return accentColor;
|
|
}),
|
|
),
|
|
),
|
|
checkboxTheme: CheckboxThemeData(
|
|
checkColor: MaterialStateProperty.all(Colors.white),
|
|
fillColor: MaterialStateProperty.all(accentColor),
|
|
),
|
|
dialogBackgroundColor: cardColor,
|
|
textTheme: GoogleFonts.latoTextTheme(
|
|
Theme.of(ctx).textTheme,
|
|
).apply(
|
|
displayColor: textColor,
|
|
bodyColor: textColor,
|
|
decorationColor: textColor,
|
|
),
|
|
hintColor: Colors.red,
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
labelStyle: TextStyle(
|
|
color: textColor.withOpacity(.5),
|
|
),
|
|
enabledBorder: UnderlineInputBorder(
|
|
borderSide: BorderSide(color: textColor.withOpacity(0.1)),
|
|
),
|
|
focusedBorder: UnderlineInputBorder(
|
|
borderSide: BorderSide(color: accentColor),
|
|
),
|
|
),
|
|
);
|
|
}
|