BlockNoteFontConfig class
Font configuration for BlockNote editor.
Allows specifying custom fonts using Flutter-friendly API instead of raw CSS. Supports both system fonts (no files needed) and custom font files.
- Available extensions
Constructors
-
BlockNoteFontConfig({required String family, List<
BlockNoteFontFile> files = const []}) -
Creates a new font configuration.
const
-
BlockNoteFontConfig.fromJson(Map<
String, dynamic> json) -
Creates a BlockNoteFontConfig from a JSON map.
factory
Properties
- family → String
-
Font family name (CSS font-family string).
final
-
files
→ List<
BlockNoteFontFile> -
Font files for @font-face declarations.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? family, List< BlockNoteFontFile> ? files}) → BlockNoteFontConfig -
generateCss(
) → String? -
Available on BlockNoteFontConfig, provided by the BlockNoteFontConfigExtension extension
Generates CSS @font-face declarations if files are provided. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this font configuration to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override