mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
38
lib/util/application_info.dart
Normal file
38
lib/util/application_info.dart
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// ignore_for_file: public_member_api_docs, sort_constructors_first
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
final applicationInfoProvider = StateProvider<ApplicationInfo>((ref) {
|
||||
return ApplicationInfo(
|
||||
name: "",
|
||||
version: "",
|
||||
os: "",
|
||||
);
|
||||
});
|
||||
|
||||
class ApplicationInfo {
|
||||
final String name;
|
||||
final String version;
|
||||
final String os;
|
||||
ApplicationInfo({
|
||||
required this.name,
|
||||
required this.version,
|
||||
required this.os,
|
||||
});
|
||||
|
||||
ApplicationInfo copyWith({
|
||||
String? name,
|
||||
String? version,
|
||||
String? os,
|
||||
}) {
|
||||
return ApplicationInfo(
|
||||
name: name ?? this.name,
|
||||
version: version ?? this.version,
|
||||
os: os ?? this.os,
|
||||
);
|
||||
}
|
||||
|
||||
String get versionAndPlatform => "$version ($os)";
|
||||
|
||||
@override
|
||||
String toString() => 'ApplicationInfo(name: $name, version: $version, os: $os)';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue