| id | caption | mediaFile | type | location | 
|---|---|---|---|---|
| 57ad8bce0a | Hi, this is … | /… | … | … | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | repositories { | |
| jcenter() | |
| } | |
| plugins { | |
| `kotlin-dsl` | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Label.text( | |
| labelText: 'Default simple text', | |
| ), | |
| Label.text( | |
| labelText: 'Larger Text', | |
| textSize: 36, | |
| ), | |
| Label.filled( | |
| labelText: 'Filled Text', | |
| backgroundColor: Colors.green, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| height: _labelHeight, | |
| decoration: BoxDecoration( | |
| border: Border.all( | |
| color: this.strokeColor ?? Colors.transparent, | |
| width: strokeWidth), | |
| borderRadius: BorderRadius.circular(_cornerSize), | |
| color: this.backgroundColor ?? Colors.transparent), | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import 'package:flutter/material.dart'; | |
| const _labelHeight = 24.0; | |
| const _cornerSize = 4.0; | |
| const _textSize = 14.0; | |
| const _strokeWidth = 2.0; | |
| class Label extends StatelessWidget { | |
| Label.text( | |
| {Key? key, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Label.text( | |
| {Key? key, | |
| required this.labelText, | |
| this.textColor = Colors.black, | |
| this.textSize = _textSize}) | |
| : assert(labelText.isNotEmpty), | |
| this.backgroundColor = Colors.transparent, | |
| this.strokeColor = Colors.transparent, | |
| this.strokeWidth = 0.0, | |
| super(key: key); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Question extends StatelessWidget { | |
| final String questionText; | |
| Question(this.questionText); // 1. normal constructor | |
| Question({this.questionText}); // 2. normal constuctor with named argument | |
| Question.text(this.questionText); // 3. named constructor | |
| Question.create({this.questionText}); // 4. named constructor with named argument | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | final String labelText; | |
| final Color? textColor; | |
| final double textSize; | |
| final Color? backgroundColor; | |
| final Color? strokeColor; | |
| final double strokeWidth; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | interface EpoxyModelClickListener { | |
| fun onPriceChanged(price: Double) | |
| } | |
| class HeaderEpoxyModel : Epoxy { | |
| @EpoxyAttribute | |
| var double price = 0.0 | |
| @EpoxyAttribute | |
| var EpoxyModelClickListener clickListener? = null | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class MyController : EpoxyController() { | |
| override fun buildModels() { | |
| HeaderImageModel_() | |
| LoadingModel_() | |
| MovieModel_() | |
| MovieModel_() | |
| FooterModel_() | |
| } | |
| } |