-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💾 Feat: Basic Plugins Page Framework
- Loading branch information
1 parent
0d30fd1
commit 31e9aa9
Showing
7 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
KitX Website Flutter/kitx_website/lib/pages/controls/plugin_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:kitx_website/shared/plugin_info.dart'; | ||
|
||
class PluginCard extends StatelessWidget { | ||
const PluginCard({ | ||
required this.info, | ||
}); | ||
|
||
final PluginInfo info; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Card.filled( | ||
child: const SizedBox( | ||
width: 200, | ||
height: 300, | ||
), | ||
); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
KitX Website Flutter/kitx_website/lib/pages/controls/plugin_item.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:kitx_website/pages/controls/plugin_card.dart'; | ||
import 'package:kitx_website/shared/plugin_info.dart'; | ||
|
||
class PluginItem extends StatelessWidget { | ||
const PluginItem({ | ||
required this.info, | ||
}); | ||
|
||
final PluginInfo info; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
var size = MediaQuery.of(context).size; | ||
return size.width > size.height | ||
? PluginCard(info: info) | ||
: Padding( | ||
padding: EdgeInsets.all(5), | ||
child: ListTile( | ||
title: Text(info.name), | ||
subtitle: Text(info.author), | ||
onTap: () {}, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
KitX Website Flutter/kitx_website/lib/shared/plugin_info.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
class PluginInfo { | ||
const PluginInfo({ | ||
required this.name, | ||
required this.version, | ||
required this.author, | ||
required this.authorLink, | ||
required this.publisher, | ||
required this.publisherLink, | ||
required this.iconBase64, | ||
required this.lastUpdated, | ||
}); | ||
|
||
final String name; | ||
|
||
final String version; | ||
|
||
final String author; | ||
|
||
final String? authorLink; | ||
|
||
final String publisher; | ||
|
||
final String? publisherLink; | ||
|
||
final String? iconBase64; | ||
|
||
final DateTime lastUpdated; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters