masamune_builder library
Building system for masamune framework. Automatic creation of models, themes, pages, and translation data.
To use, import package:masamune_builder/masamune_builder.dart
.
Classes
- Api
- Provides static methods for making HTTP requests.
- ClassValue
- Defines the value of the class to which the annotation is assigned.
- CollectionModelGenerator
-
Collection model generator for classes annotated with
CollectionModelPath
. - ControllerGenerator
-
Generator of controllers for classes annotated with the
Controller
annotation. - ControllerGroupGenerator
-
Generator of controller groups for classes annotated with the
ControllerGroup
annotation. - DateDuration
- A class that represents a date period.
- DateFormat
- DateFormat is for formatting and parsing dates in a locale-sensitive manner.
- DocumentModelGenerator
-
Generator of document models for classes annotated with
DocumentModelPath
. - FormValueGenerator
-
Generator of form queries for classes annotated with
FormValue
. - GoogleSpreadSheetValue
-
Class for storing annotation values in
GoogleSpreadSheetDataSource
. - Immutable
- Used to annotate a class.
- ModelAnnotationValue
- Class for storing annotation values.
-
NumRange<
TNum extends num> - A class that represents a range of numbers.
- ParamaterValue
- Parameter Value.
- PathValue
- Value for path.
- Required
-
Used to annotate a named parameter
p
in a method or functionf
. - TypedefValue
- Defines the value of the class to which the annotation is assigned.
Extensions
- BooleanExtensions
- Provides extended methods for bool.
- DateTimeExtensions
- Provides extended methods for DateTime.
- DateTimeIterableExtensions
- Provides extended methods for DateTime arrays.
- DoubleExtensions
- Provides extended methods for double.
- DoubleIterableExtensions
- Provides extended methods for double arrays.
- DurationExtensions
- Provides extended methods for Duration.
- DynamicMapExtensions
- Provides extended methods for DynamicMap.
- InterableOfIterableExtensions
- Provides extended methods for Iterable arrays.
- IntExtensions
- Provides extended methods for int.
- IntIterableExtensions
- Provides extended methods for int arrays.
- IterableExtensions
-
Provides extended methods for
T
arrays. - JsonDynamicListExtensions
- Provides Json extension methods for DynamicList.
- JsonDynamicMapExtensions
- Provides Json extension methods for DynamicMap.
- ListExtensions
-
Provides extended methods for List in
T
. - MapExtensions
- Provides extended methods for Map.
- NullableDoubleExtensions
- Provides an extension method for double that is nullable.
- NullableIntExtensions
- Provides an extension method for int that is nullable.
- NullableIterableExtensions
- Provides an extension method for Iterable that is nullable.
- NullableListExtensions
- Provides an extension method for List that is nullable.
- NullableMapExtensions
- Provides an extension method for Map that is nullable.
- NullableNumExtensions
- Provides an extension method for num that is nullable.
- NullableObjectExtensions
- Provides an extension method for List that is nullable.
- NullableSetExtensions
- Provides an extension method for Set that is nullable.
- NullableStringExtensions
- Provides an extension method for String that is nullable.
- NullableUriExtensions
- Provides an extension method for Uri that is nullable.
- NullableValueIterableExtensions
- Provides an extension method for Iterable whose value is nullable.
- RandomExtensions
- Provides extended methods for Random.
- SetExtensions
- Provides extended methods for Set.
- StringExtensions
- Provides extended methods for String.
- UriExtensions
- Provides extended methods for Uri.
Constants
- nullOfBool → const bool?
-
A
null
object with a defined type of bool? - nullOfDouble → const double?
-
A
null
object with a defined type of double? - nullOfDynamicList → const DynamicList?
-
A
null
object with a defined type of DynamicList? - nullOfDynamicMap → const DynamicMap?
-
A
null
object with a defined type of DynamicMap? - nullOfInt → const int?
-
A
null
object with a defined type of int? - nullOfNum → const num?
-
A
null
object with a defined type of num? - nullOfString → const String?
-
A
null
object with a defined type of String? - zeroOfNum → const num
-
A
0
object with a defined type of num?
Properties
- sprintf ↔ PrintFormat
-
getter/setter pair
Functions
-
collectionModelClass(
ClassValue model, ModelAnnotationValue annotation, PathValue path, PathValue? mirror, GoogleSpreadSheetValue googleSpreadSheetValue) → List< Spec> - Create a class to automatically create a collection model.
-
collectionModelQueryClass(
ClassValue model, ModelAnnotationValue annotation, PathValue path, PathValue? mirror, GoogleSpreadSheetValue googleSpreadSheetValue) → List< Spec> - Create a class to automatically create collection model queries.
-
controllerClass(
ClassValue model, bool autoDisposeWhenUnreferenced) → List< Spec> -
Create a class for the controller query to be used with
ref.page.controller
. -
controllerGroupClass(
ClassValue model, bool autoDisposeWhenUnreferenced) → List< Spec> -
Create a class for the controller group query to be used with
ref.page.controller
. -
documentModelClass(
ClassValue model, ModelAnnotationValue annotation, PathValue path, PathValue? mirror, GoogleSpreadSheetValue googleSpreadSheetValue) → List< Spec> - Create a class to automatically create a document model.
-
documentModelQueryClass(
ClassValue model, ModelAnnotationValue annotation, PathValue path, PathValue? mirror, GoogleSpreadSheetValue googleSpreadSheetValue) → List< Spec> - Create a class to automatically create document model queries.
-
formValueClass(
ClassValue model, bool autoDisposeWhenUnreferenced) → List< Spec> -
Create a FormController query class for use with
ref.page.controller
. -
generateCode(
int length, {int seed = 0, String charSet = "23456789abcdefghjkmnpqrstuvwxy"}) → String -
Generates and returns a random string with the number of characters given by
length
. -
initializeDateFormatting(
[String? locale, String? ignored]) → Future< void> -
This should be called for at least one
locale
before any date formatting methods are called. It sets up the lookup for date symbols. Both thelocale
andignored
parameter are ignored, as the data for all locales is directly available. -
jsonDecodeAsList<
T extends Object?> (String json, [List< T> defaultValue = const []]) → List<T> -
Converts
json
to a Json-decoded List -
jsonDecodeAsMap<
T extends Object?> (String json, [Map< String, T> defaultValue = const {}]) → Map<String, T> -
Converts
json
to a Json-decoded Map<String, dynamic> object. -
jsonEncodable(
Object? o) → bool -
If this object is Json encodable,
true
is returned. -
katanaListenablesBuilderFactory(
BuilderOptions options) → Builder - Builder to create a group of Listenable.
-
katanaLocalizationBuilderFactory(
BuilderOptions options) → Builder - Builder factory for translation.
-
katanaPrefsBuilderFactory(
BuilderOptions options) → Builder - Builder to create a class to read and write SharedPreferences.
-
katanaRouterPageBuilderFactory(
BuilderOptions options) → Builder - Builder Factory for pages.
-
katanaRouterRouterBuilderFactory(
BuilderOptions options) → Builder - Builder factory for routers.
-
katanaThemeBuilderFactory(
BuilderOptions options) → Builder - Builder for creating data for themes.
-
masamuneBuilderFactory(
BuilderOptions options) → Builder - Builder to generate codes for Controllers and Models.
-
modelClass(
ClassValue model, ModelAnnotationValue annotation, PathValue path, PathValue? mirror, GoogleSpreadSheetValue googleSpreadSheetValue) → List< Spec> - Create document and collection models.
-
nullOfList<
T> () → List< T> ? -
A
null
object with a defined type of List<T>? -
nullOfMap<
K, V> () → Map< K, V> ? -
A
null
object with a defined type of Map<K, V>? -
nullOfSet<
T> () → Set< T> ? -
A
null
object with a defined type of Set<T>? -
uuid(
{DateTime? baseTime, bool reverse = false}) → String - Generate and retrieve the UUID for Version 7.
-
wait(
Iterable futures) → Future< void> -
Wait until all Futures given in
futures
are completed.
Enums
- CollectionQueryType
- The type of query method for the collection.
Typedefs
- ApiResponse = Response
- An HTTP response where the entire response body is known in advance.
- ApiResquest = Request
- An HTTP request where the entire request body is known in advance.
- DynamicList = List
- Represents the type of List<dynamic>.
-
DynamicMap
= Map<
String, dynamic> - Represents the type of Map<String, dynamic>.