UserMetadata (models/user_metadata.dart)

mvp-boilerplate · flutter/lib/models/user_metadata.dart · dart · MIT
auth

Data model for user metadata with JSON serialization for Flutter apps.

// Source: https://github.com/devtodollars/mvp-boilerplate | License: MIT | Copyright 2024 Matthew Wong
// Provided via justclaw.it.com; keep this notice with the code.
import 'package:devtodollars/models/stripe.dart';

class UserMetadata {
  final String? avatarUrl;
  final Map<String, dynamic>? billingAddress;
  final String? fullName;
  final String id;
  final Map<String, dynamic>? paymentMethod;
  SubscriptionWithPrice? subscription;

  UserMetadata({
    this.avatarUrl,
    this.billingAddress,
    this.fullName,
    required this.id,
    this.paymentMethod,
    this.subscription,
  });

  factory UserMetadata.fromJson(Map<String, dynamic> json) {
    return UserMetadata(
      avatarUrl: json['avatar_url'],
      billingAddress: json['billing_address'],
      fullName: json['full_na

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key