getSampleTemplates function

List<TemplateModel> getSampleTemplates()

Sample templates for the Template Maker

Implementation

List<TemplateModel> getSampleTemplates() {
  return [
    // Business Card Template
    TemplateModel(
      id: '1',
      name: 'Business Card with Shapes',
      ratio: '1:1',
      canvas: CanvasModel(
        width: 800,
        height: 800,
        background: BackgroundModel(type: 'image'),
        backgroundImage:
            'https://images.unsplash.com/photo-1522202176988-66273c2fd55f',
      ),
      layers: [
        TextLayerModel(
          id: 'title',
          type: 'text',
          x: 50,
          y: 100,
          fontSize: 36,
          color: '#333333',
          font: 'poppins_semibold.ttf',
          defaultText: 'John Doe',
          label: 'Name',
        ),
        TextLayerModel(
          id: 'company',
          type: 'text',
          x: 50,
          y: 150,
          fontSize: 24,
          color: '#666666',
          font: 'poppins_semibold.ttf',
          defaultText: 'CEO & Founder',
          label: 'Title',
        ),
        ShapeLayerModel(
          id: 'shape1',
          type: 'shape',
          x: 50,
          y: 200,
          shapeType: 'line',
          width: 300,
          height: 2,
          strokeColor: '#333333',
          strokeWidth: 3,
        ),
        ShapeLayerModel(
          id: 'shape2',
          type: 'shape',
          x: 600,
          y: 50,
          shapeType: 'circle',
          width: 150,
          height: 150,
          fillColor: '#4CAF50',
          strokeColor: '#2E7D32',
          strokeWidth: 4,
        ),
        TextLayerModel(
          id: 'phone',
          type: 'text',
          x: 50,
          y: 250,
          fontSize: 18,
          color: '#333333',
          font: 'poppins_semibold.ttf',
          defaultText: '+1 (555) 123-4567',
          label: 'Phone',
        ),
        TextLayerModel(
          id: 'email',
          type: 'text',
          x: 50,
          y: 280,
          fontSize: 18,
          color: '#333333',
          font: 'poppins_regular.ttf',
          defaultText: 'john.doe@company.com',
          label: 'Email',
        ),
      ],
    ),

    // Social Media Post Template
    TemplateModel(
      id: '2',
      name: 'Social Media Post',
      ratio: '1:1',
      canvas: CanvasModel(
        width: 1080,
        height: 1080,
        background: BackgroundModel(type: 'image'),
        backgroundImage:
            'https://images.unsplash.com/photo-1492724441997-5dc865305da7',
      ),
      layers: [
        ShapeLayerModel(
          id: 'header_shape',
          type: 'shape',
          x: 0,
          y: 0,
          shapeType: 'rectangle',
          width: 1080,
          height: 200,
          fillColor: '#2196F3',
        ),
        TextLayerModel(
          id: 'title',
          type: 'text',
          x: 100,
          y: 80,
          fontSize: 48,
          color: '#FFFFFF',
          font: 'poppins_semibold.ttf',
          defaultText: 'Welcome to Our Team!',
          label: 'Title',
        ),
        ShapeLayerModel(
          id: 'accent_shape',
          type: 'shape',
          x: 800,
          y: 300,
          shapeType: 'oval',
          width: 200,
          height: 100,
          fillColor: '#FF9800',
          strokeColor: '#F57C00',
          strokeWidth: 3,
        ),
        TextLayerModel(
          id: 'description',
          type: 'text',
          x: 100,
          y: 300,
          fontSize: 24,
          color: '#333333',
          font: 'poppins_semibold.ttf',
          defaultText: "We're excited to announce our new product launch!",
          label: 'Description',
        ),
      ],
    ),

    // Logo Design Template
    TemplateModel(
      id: '3',
      name: 'Logo Design Template',
      ratio: '16:9',
      canvas: CanvasModel(
        width: 1920,
        height: 1080,
        background: BackgroundModel(type: 'image'),
        backgroundImage: 'https://placehold.co/600x600',
      ),
      layers: [
        ShapeLayerModel(
          id: 'main_circle',
          type: 'shape',
          x: 200,
          y: 200,
          shapeType: 'circle',
          width: 150,
          height: 150,
          fillColor: '#9C27B0',
          strokeColor: '#4A148C',
          strokeWidth: 8,
        ),
        ShapeLayerModel(
          id: 'secondary_triangle',
          type: 'shape',
          x: 500,
          y: 300,
          shapeType: 'triangle',
          width: 100,
          height: 80,
          fillColor: '#FF5722',
          strokeColor: '#BF360C',
          strokeWidth: 4,
        ),
        TextLayerModel(
          id: 'company_name',
          type: 'text',
          x: 100,
          y: 500,
          fontSize: 64,
          color: '#333333',
          font: 'poppins_semibold.ttf',
          defaultText: 'ACME CORP',
          label: 'Company Name',
        ),
      ],
    ),
  ];
}