katana_flutter library

This package contains utility classes such as the Masamune package.

To use, import package:katana_flutter/katana_flutter.dart.

Classes

Api
Provides static methods for making HTTP requests.
Config
Class that handles the app config.
Const
Class that defines a constant value.
DateDuration
A class that represents a date period.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
FontAwesomeIcons
Icons based on font awesome 6.5.1
Immutable
Used to annotate a class.
Localize
Class to translate.
MetaConst
Class that defines a constant value for metadata.
Prefs
Save and load data locally.
Required
Used to annotate a named parameter p in a method or function f.
UserStateChangedCallback
Callback class to be called when the user's state is changed.

Enums

Ages
Ages.
ConnectivityResult
Connection status check result.
Gender
Gender.

Extensions

AgesExtensions
ColorExtensions
Provides general extensions to Color.
CSVListExtensions
Extended method of listing for CSV.
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.
FlutterDateTimeExtensions
Provides flutter extensions to DateTime.
GenderExtensions
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.
ListOfDynamicMapExtensions
Extension methods for DynamicMap listings.
LocalizeStringExtensions
Provides localize extensions to String.
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.
NullableLocalizeStringExtensions
Provides general extensions to String?.
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.
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.

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
uuid String
Generate and retrieve the UUID for Version 4.
no setter

Functions

generateCode(int length, {int seed = 0, String charSet = "23456789abcdefghjkmnpqrstuvwxy"}) String
Generates and returns a random string with the number of characters given by length.
generateRandomMaterialColor({List<Color>? ignoreColors, int? seed}) MaterialColor
Gets a random material design color (the color available in white text color).
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 the locale and ignored 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.
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>?
openURL(String url) Future<void>
Open a new external url.
share({String? text, String? title, List<String> files = const []}) Future<void>
Share text and files with external applications.
wait(Iterable futures) Future<void>
Wait until all Futures given in futures are completed.

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>.