WebifyConfig class
Global configuration for webify.
Pass this to Webify.initialize at app startup.
Webify.initialize(
config: WebifyConfig(
baseUrl: 'https://myapp.com',
defaultTitle: 'My App',
titleTemplate: '%s | My App',
),
);
Constructors
-
WebifyConfig({String? baseUrl, String? defaultTitle, String? titleTemplate, String? defaultDescription, String? defaultOgImage, String? twitterSite, String? locale, OrganizationSchema? defaultOrganization, List<
AnalyticsProvider> analyticsProviders = const [], bool enableNoscriptFallback = true, bool debugMode = false, String? defaultRobots}) -
const
Properties
-
analyticsProviders
→ List<
AnalyticsProvider> -
Analytics providers to initialize
final
- baseUrl → String?
-
Base URL of your website (e.g., 'https://myapp.com')
final
- debugMode → bool
-
Whether to show debug information (debug overlay, console logs)
final
- defaultDescription → String?
-
Default meta description
final
- defaultOgImage → String?
-
Default Open Graph image URL
final
- defaultOrganization → OrganizationSchema?
-
Default organization structured data injected on init
final
- defaultRobots → String?
-
Default robots directive (e.g., 'index, follow')
final
- defaultTitle → String?
-
Default page title when none is specified
final
- enableNoscriptFallback → bool
-
Whether to inject
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → String?
-
Default language/locale (e.g., 'en_US')
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- titleTemplate → String?
-
Title template — use %s as placeholder for the page title
e.g., '%s | My App' → 'About | My App'
final
- twitterSite → String?
-
Default Twitter/X @username for twitter:site tag
final
Methods
-
copyWith(
{String? baseUrl, String? defaultTitle, String? titleTemplate, String? defaultDescription, String? defaultOgImage, String? twitterSite, String? locale, OrganizationSchema? defaultOrganization, List< AnalyticsProvider> ? analyticsProviders, bool? enableNoscriptFallback, bool? debugMode, String? defaultRobots}) → WebifyConfig - Creates a copy with overridden values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited