-
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: Display some key information in about page
- UI will be updated soon - Use custom build scripts we allow application to display last build timestamp
- Loading branch information
1 parent
2fd456a
commit 8877df2
Showing
11 changed files
with
145 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
builders: | ||
package_name|appBuildTimestampGenerator: | ||
import: "package:kitx_website/common/build/app_build_timestamp_generator.dart" | ||
builder_factories: ["appBuildTimestampGenerator"] | ||
build_extensions: { ".dart": [".my_gen.dart"] } | ||
auto_apply: root_package | ||
build_to: source |
4 changes: 4 additions & 0 deletions
4
KitX Website Flutter/kitx_website/lib/common/build/app_build_timestamp.g.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,4 @@ | ||
// Generated file on build. | ||
|
||
/// Timestamp that records last build of the app. Can be shown in the app. | ||
const int lastAppBuildTimestamp = 1725820249737; |
23 changes: 23 additions & 0 deletions
23
KitX Website Flutter/kitx_website/lib/common/build/app_build_timestamp_generator.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,23 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:build/build.dart'; | ||
|
||
Builder appBuildTimestampGenerator(BuilderOptions options) => AppBuildTimestampGeneratorBuilder(); | ||
|
||
class AppBuildTimestampGeneratorBuilder implements Builder { | ||
@override | ||
final buildExtensions = { | ||
'.dart': ['.my_gen.dart'] | ||
}; | ||
|
||
@override | ||
Future<void> build(BuildStep _) async { | ||
final outputFile = File('lib/common/build/app_build_timestamp.g.dart'); | ||
await outputFile.writeAsString(''' | ||
// Generated file on build. | ||
/// Timestamp that records last build of the app. Can be shown in the app. | ||
const int lastAppBuildTimestamp = ${DateTime.now().millisecondsSinceEpoch}; | ||
'''); | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
KitX Website Flutter/kitx_website/lib/pages/about_page.dart
This file was deleted.
Oops, something went wrong.
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
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