2023-01-31 21:24:26 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2022-10-23 20:09:41 +00:00
|
|
|
/// `valueM` represents the base value.
|
|
|
|
/// All other values differs by 8dp.
|
|
|
|
class Dimens {
|
|
|
|
static const double borderRadiusM = 16;
|
|
|
|
static const double borderRadiusL = 24;
|
2022-11-29 18:46:23 +00:00
|
|
|
static const double borderRadiusXL = 32;
|
2022-10-23 20:09:41 +00:00
|
|
|
|
2024-05-20 15:08:37 +00:00
|
|
|
static const double elevationLevel0 = 0;
|
|
|
|
static const double elevationLevel1 = 1;
|
|
|
|
static const double elevationLevel2 = 3;
|
|
|
|
static const double elevationLevel3 = 6;
|
|
|
|
|
2022-10-24 20:25:38 +00:00
|
|
|
static const double grid4 = 4;
|
2022-10-23 20:09:41 +00:00
|
|
|
static const double grid8 = 8;
|
|
|
|
static const double grid16 = 16;
|
2022-10-26 19:49:21 +00:00
|
|
|
static const double grid24 = 24;
|
2023-01-29 17:02:18 +00:00
|
|
|
static const double grid48 = 48;
|
2022-12-04 20:10:04 +00:00
|
|
|
static const double grid56 = 56;
|
2023-02-19 10:26:14 +00:00
|
|
|
static const double grid72 = 72;
|
2022-10-23 20:09:41 +00:00
|
|
|
|
2023-01-31 21:24:26 +00:00
|
|
|
static const double paddingS = 8;
|
2022-10-23 20:09:41 +00:00
|
|
|
static const double paddingM = 16;
|
2022-11-27 20:22:56 +00:00
|
|
|
static const double paddingL = 24;
|
2022-10-29 10:52:05 +00:00
|
|
|
|
|
|
|
static const Duration durationS = Duration(milliseconds: 100);
|
2022-11-26 19:29:00 +00:00
|
|
|
static const Duration durationSM = Duration(milliseconds: 150);
|
2022-10-29 10:52:05 +00:00
|
|
|
static const Duration durationM = Duration(milliseconds: 200);
|
2022-11-29 18:46:23 +00:00
|
|
|
static const Duration durationML = Duration(milliseconds: 250);
|
2022-10-29 10:52:05 +00:00
|
|
|
static const Duration durationL = Duration(milliseconds: 300);
|
2023-08-04 14:17:40 +00:00
|
|
|
static const Duration switchDuration = Duration(milliseconds: 100);
|
2022-12-21 19:31:22 +00:00
|
|
|
|
2023-03-30 19:24:18 +00:00
|
|
|
static const double enabledOpacity = 1.0;
|
|
|
|
static const double disabledOpacity = 0.38;
|
|
|
|
|
2023-09-02 08:32:08 +00:00
|
|
|
static const double sliverAppBarExpandedHeight = 168;
|
|
|
|
|
2023-01-29 16:57:47 +00:00
|
|
|
// TopBar
|
2023-04-05 19:15:11 +00:00
|
|
|
static const double readingContainerDoubleValueHeight = 128;
|
2023-03-30 19:24:18 +00:00
|
|
|
static const double readingContainerSingleValueHeight = 76;
|
2023-01-29 16:57:47 +00:00
|
|
|
|
2023-01-26 09:10:23 +00:00
|
|
|
// `CenteredSlider`
|
2022-12-21 19:31:22 +00:00
|
|
|
static const double cameraSliderTrackHeight = grid4;
|
|
|
|
static const double cameraSliderTrackRadius = cameraSliderTrackHeight / 2;
|
2024-04-07 08:54:57 +00:00
|
|
|
static const double cameraSliderHandleArea = 32;
|
|
|
|
static const double cameraSliderHandleSize = 24;
|
2022-12-21 19:31:22 +00:00
|
|
|
static const double cameraSliderHandleIconSize = cameraSliderHandleSize * 2 / 3;
|
2023-01-31 21:24:26 +00:00
|
|
|
|
|
|
|
// Dialog
|
|
|
|
// Taken from `Dialog` documentation
|
2023-02-05 14:20:36 +00:00
|
|
|
static const EdgeInsets dialogTitlePadding = EdgeInsets.fromLTRB(
|
|
|
|
paddingL,
|
|
|
|
paddingL,
|
|
|
|
paddingL,
|
|
|
|
paddingM,
|
|
|
|
);
|
2023-03-30 19:24:18 +00:00
|
|
|
static const EdgeInsets dialogIconTitlePadding = EdgeInsets.fromLTRB(
|
2023-02-05 14:20:36 +00:00
|
|
|
paddingL,
|
2023-03-30 19:24:18 +00:00
|
|
|
0,
|
|
|
|
paddingL,
|
|
|
|
paddingM,
|
|
|
|
);
|
|
|
|
static const EdgeInsets dialogActionsPadding = EdgeInsets.fromLTRB(
|
|
|
|
paddingM,
|
2023-02-05 14:20:36 +00:00
|
|
|
paddingM,
|
|
|
|
paddingL,
|
|
|
|
paddingL,
|
|
|
|
);
|
2023-01-31 21:24:26 +00:00
|
|
|
static const EdgeInsets dialogMargin = EdgeInsets.symmetric(horizontal: 40.0, vertical: 24.0);
|
2024-05-21 17:13:33 +00:00
|
|
|
|
|
|
|
// TODO(@vodemn) constrain dialogs with this value
|
|
|
|
static const double tabletMaxWidth = 600;
|
2022-10-23 20:09:41 +00:00
|
|
|
}
|