LocalBusinessSchema class

Schema.org LocalBusiness structured data.

For businesses with a physical location. Shows in Google Maps and local search results.

LocalBusinessSchema(
  name: 'My Restaurant',
  businessType: LocalBusinessType.restaurant,
  address: PostalAddress(
    streetAddress: '123 Main St',
    addressLocality: 'Springfield',
    addressRegion: 'IL',
    postalCode: '62701',
    addressCountry: 'US',
  ),
  telephone: '+1-555-0123',
  openingHours: [
    OpeningHours(dayOfWeek: 'Monday', opens: '08:00', closes: '22:00'),
    OpeningHours(dayOfWeek: 'Tuesday', opens: '08:00', closes: '22:00'),
  ],
  priceRange: '\$\$',
  geo: GeoCoordinates(latitude: 39.7817, longitude: -89.6501),
)

See: https://schema.org/LocalBusiness

Inheritance

Constructors

LocalBusinessSchema({required String name, LocalBusinessType? businessType, String? description, String? url, String? image, String? telephone, String? email, PostalAddress? address, GeoCoordinates? geo, List<OpeningHours>? openingHours, String? priceRange, List<String>? sameAs, String? menu, List<String>? servesCuisine, String? currenciesAccepted, String? paymentAccepted})
const

Properties

address → PostalAddress?
final
businessType → LocalBusinessType?
final
currenciesAccepted → String?
final
description → String?
final
email → String?
final
geo → GeoCoordinates?
final
hashCode → int
The hash code for this object.
no setterinherited
image → String?
final
final
name → String
final
openingHours → List<OpeningHours>?
final
paymentAccepted → String?
final
priceRange → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sameAs → List<String>?
final
servesCuisine → List<String>?
final
telephone → String?
final
url → String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonLd() → String
Convert to a complete JSON-LD string with @context.
inherited
toJsonLdMinified() → String
Convert to a minified JSON-LD string (no extra whitespace).
inherited
toMap() → Map<String, dynamic>
Convert this schema to a map (without @context). Subclasses must implement this.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited