UpCode constructor

const UpCode({
  1. Key? key,
  2. String? code,
  3. UpStyle? style,
  4. UpColorType? colorType,
  5. String? assetCode,
  6. double height = 256,
  7. EdgeInsetsGeometry padding = const EdgeInsets.only(top: 12),
  8. Color? backgroundColor,
  9. String language = 'dart',
  10. bool showViewToggle = false,
  11. Map<String, TextStyle> theme = const {'root' : TextStyle(backgroundColor: Colors.transparent, color: Color(0xff272822)), 'tag' : TextStyle(color: Color(0xfff92672)), 'keyword' : TextStyle(color: Color(0xfff92672), fontWeight: FontWeight.bold), 'selector-tag' : TextStyle(color: Color(0xfff92672), fontWeight: FontWeight.bold), 'literal' : TextStyle(color: Color(0xfff92672), fontWeight: FontWeight.bold), 'strong' : TextStyle(color: Color(0xfff92672)), 'name' : TextStyle(color: Color(0xfff92672)), 'code' : TextStyle(color: Color(0xff66d9ef)), 'attribute' : TextStyle(color: Color(0xffbf79db)), 'symbol' : TextStyle(color: Color(0xffbf79db)), 'regexp' : TextStyle(color: Color(0xffbf79db)), 'link' : TextStyle(color: Color(0xffbf79db)), 'string' : TextStyle(color: Colors.blue), 'bullet' : TextStyle(color: Colors.blue), 'subst' : TextStyle(color: Colors.blue), 'title' : TextStyle(color: Colors.blue, fontWeight: FontWeight.bold), 'section' : TextStyle(color: Colors.blue, fontWeight: FontWeight.bold), 'emphasis' : TextStyle(color: Colors.blue), 'type' : TextStyle(color: Colors.blue, fontWeight: FontWeight.bold), 'built_in' : TextStyle(color: Colors.blue), 'builtin-name' : TextStyle(color: Color(0xffa6e22e)), 'selector-attr' : TextStyle(color: Color(0xffa6e22e)), 'selector-pseudo' : TextStyle(color: Color(0xffa6e22e)), 'addition' : TextStyle(color: Color(0xffa6e22e)), 'variable' : TextStyle(color: Colors.blue), 'template-tag' : TextStyle(color: Color(0xffa6e22e)), 'template-variable' : TextStyle(color: Color(0xffa6e22e)), 'comment' : TextStyle(color: Color(0xff75715e)), 'quote' : TextStyle(color: Color(0xff75715e)), 'deletion' : TextStyle(color: Color(0xff75715e)), 'meta' : TextStyle(color: Color(0xff75715e)), 'doctag' : TextStyle(fontWeight: FontWeight.bold), 'selector-id' : TextStyle(fontWeight: FontWeight.bold)},
})

Implementation

const UpCode({
  super.key,
  this.code,
  this.style,
  this.colorType,
  this.assetCode,
  this.height = 256,
  this.padding = const EdgeInsets.only(top: 12),
  this.backgroundColor,
  this.language = 'dart',
  this.showViewToggle = false,
  this.theme = const {
    'root': TextStyle(
        backgroundColor: Colors.transparent, color: Color(0xff272822)),
    'tag': TextStyle(color: Color(0xfff92672)),
    'keyword':
        TextStyle(color: Color(0xfff92672), fontWeight: FontWeight.bold),
    'selector-tag':
        TextStyle(color: Color(0xfff92672), fontWeight: FontWeight.bold),
    'literal':
        TextStyle(color: Color(0xfff92672), fontWeight: FontWeight.bold),
    'strong': TextStyle(color: Color(0xfff92672)),
    'name': TextStyle(color: Color(0xfff92672)),
    'code': TextStyle(color: Color(0xff66d9ef)),
    'attribute': TextStyle(color: Color(0xffbf79db)),
    'symbol': TextStyle(color: Color(0xffbf79db)),
    'regexp': TextStyle(color: Color(0xffbf79db)),
    'link': TextStyle(color: Color(0xffbf79db)),
    'string': TextStyle(color: Colors.blue),
    'bullet': TextStyle(color: Colors.blue),
    'subst': TextStyle(color: Colors.blue),
    'title': TextStyle(color: Colors.blue, fontWeight: FontWeight.bold),
    'section': TextStyle(color: Colors.blue, fontWeight: FontWeight.bold),
    'emphasis': TextStyle(color: Colors.blue),
    'type': TextStyle(color: Colors.blue, fontWeight: FontWeight.bold),
    'built_in': TextStyle(color: Colors.blue),
    'builtin-name': TextStyle(color: Color(0xffa6e22e)),
    'selector-attr': TextStyle(color: Color(0xffa6e22e)),
    'selector-pseudo': TextStyle(color: Color(0xffa6e22e)),
    'addition': TextStyle(color: Color(0xffa6e22e)),
    'variable': TextStyle(color: Colors.blue),
    'template-tag': TextStyle(color: Color(0xffa6e22e)),
    'template-variable': TextStyle(color: Color(0xffa6e22e)),
    'comment': TextStyle(color: Color(0xff75715e)),
    'quote': TextStyle(color: Color(0xff75715e)),
    'deletion': TextStyle(color: Color(0xff75715e)),
    'meta': TextStyle(color: Color(0xff75715e)),
    'doctag': TextStyle(fontWeight: FontWeight.bold),
    'selector-id': TextStyle(fontWeight: FontWeight.bold),
  },
});