mirror of
https://github.com/foss42/apidash.git
synced 2025-12-07 21:50:34 +08:00
feat: add initial dashbot package implementation
- Created a new Dashbot package with core functionalities. - Implemented Dashbot window model and notifier for state management. - Added UI components including Dashbot default page and home page. - Integrated routing for Dashbot with initial routes defined. - Included assets for Dashbot icons and set up pubspec.yaml. - Added tests for Dashbot window notifier to ensure functionality. - Established a basic README and CHANGELOG for the package.
This commit is contained in:
31
packages/dashbot/lib/core/model/dashbot_window_model.dart
Normal file
31
packages/dashbot/lib/core/model/dashbot_window_model.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
class DashbotWindowModel {
|
||||
final double width;
|
||||
final double height;
|
||||
final double right;
|
||||
final double bottom;
|
||||
final bool isActive;
|
||||
|
||||
const DashbotWindowModel({
|
||||
this.width = 350,
|
||||
this.height = 450,
|
||||
this.right = 50,
|
||||
this.bottom = 100,
|
||||
this.isActive = false,
|
||||
});
|
||||
|
||||
DashbotWindowModel copyWith({
|
||||
double? width,
|
||||
double? height,
|
||||
double? right,
|
||||
double? bottom,
|
||||
bool? isActive,
|
||||
}) {
|
||||
return DashbotWindowModel(
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
right: right ?? this.right,
|
||||
bottom: bottom ?? this.bottom,
|
||||
isActive: isActive ?? this.isActive,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user