Skip to content

Commit

Permalink
deploy: 20344fc
Browse files Browse the repository at this point in the history
  • Loading branch information
njooma committed Aug 2, 2023
1 parent 17ed96e commit 323d97e
Show file tree
Hide file tree
Showing 46 changed files with 171 additions and 249 deletions.
2 changes: 1 addition & 1 deletion index.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions widgets/widgets-library.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,47 +68,47 @@ <h2>Classes</h2>

</dt>
<dd>

A <a href="https://pub.dev/documentation/flutter_joystick/0.0.3/flutter_joystick/Joystick-class.html">Joystick</a> to control a specific <a href="../viam_sdk/Base-class.html">Base</a>
</dd>

<dt id="ViamBaseScreen">
<span class="name "><a href="../widgets_resources_base/ViamBaseScreen-class.html">ViamBaseScreen</a></span>

</dt>
<dd>

A widget to control a <a href="../viam_sdk/Base-class.html">Base</a>.
</dd>

<dt id="ViamBoardWidget">
<span class="name "><a href="../widgets_resources_board/ViamBoardWidget-class.html">ViamBoardWidget</a></span>

</dt>
<dd>

A widget to control a <a href="../viam_sdk/Board-class.html">Board</a>.
</dd>

<dt id="ViamButton">
<span class="name "><a href="../widgets_button/ViamButton-class.html">ViamButton</a></span>

</dt>
<dd>

A button that has Viam specific styling
</dd>

<dt id="ViamCameraStreamView">
<span class="name "><a href="../widgets_camera_stream/ViamCameraStreamView-class.html">ViamCameraStreamView</a></span>

</dt>
<dd>

A widget to display a WebRTC stream from a <a href="../viam_sdk/Camera-class.html">Camera</a>.
</dd>

<dt id="ViamSensorWidget">
<span class="name "><a href="../widgets_resources_sensor/ViamSensorWidget-class.html">ViamSensorWidget</a></span>

</dt>
<dd>

A widget to display data from a <a href="../viam_sdk/Sensor-class.html">Sensor</a>.
</dd>

</dl>
Expand All @@ -128,7 +128,7 @@ <h2>Enums</h2>

</dt>
<dd>

The fill style of the button.
</dd>

<dt id="ViamButtonRole">
Expand All @@ -144,15 +144,15 @@ <h2>Enums</h2>

</dt>
<dd>

The size class of the button.
</dd>

<dt id="ViamButtonVariant">
<span class="name "><a href="../widgets_button/ViamButtonVariant.html">ViamButtonVariant</a></span>

</dt>
<dd>

The variant of the button
</dd>

</dl>
Expand Down
17 changes: 10 additions & 7 deletions widgets_button/ViamButton-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ <h1><span class="kind-class">ViamButton</span> class
</h1></div>


<section class="desc markdown">
<p>A button that has Viam specific styling</p>
</section>


<section>
Expand Down Expand Up @@ -120,7 +123,7 @@ <h2>Properties</h2>

</dt>
<dd>

The icon to display
<div class="features"><span class="feature">final</span></div>

</dd>
Expand All @@ -142,7 +145,7 @@ <h2>Properties</h2>

</dt>
<dd>

The action that should be performed when the button is pressed
<div class="features"><span class="feature">final</span></div>

</dd>
Expand All @@ -153,7 +156,7 @@ <h2>Properties</h2>

</dt>
<dd>

The role of the button
<div class="features"><span class="feature">final</span></div>

</dd>
Expand All @@ -175,7 +178,7 @@ <h2>Properties</h2>

</dt>
<dd>

The size class of the button
<div class="features"><span class="feature">final</span></div>

</dd>
Expand All @@ -186,7 +189,7 @@ <h2>Properties</h2>

</dt>
<dd>

The fill style of the button
<div class="features"><span class="feature">final</span></div>

</dd>
Expand All @@ -197,7 +200,7 @@ <h2>Properties</h2>

</dt>
<dd>

The text of the button
<div class="features"><span class="feature">final</span></div>

</dd>
Expand All @@ -208,7 +211,7 @@ <h2>Properties</h2>

</dt>
<dd>

The button variant
<div class="features"><span class="feature">final</span></div>

</dd>
Expand Down
35 changes: 16 additions & 19 deletions widgets_button/ViamButton/build.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,23 @@ <h2><span>Implementation</span></h2>
<pre class="language-dart"><code class="language-dart">@override
Widget build(BuildContext context) {
Widget child;
if (icon != null) {
final prePadding = (variant == ViamButtonVariant.iconOnly) ? const Text(&#39; &#39;) : const SizedBox.shrink();
final iconWidget = Row(children: [prePadding, Icon(icon!)]);
final label = (variant == ViamButtonVariant.iconOnly)
? const SizedBox.shrink()
: Text(
text,
style: const TextStyle(fontWeight: FontWeight.bold),
);
final first = (variant == ViamButtonVariant.iconTrailing) ? label : iconWidget;
final second = (variant == ViamButtonVariant.iconTrailing) ? iconWidget : label;
if (style == ViamButtonFillStyle.outline) {
child = OutlinedButton.icon(onPressed: onPressed, icon: first, label: second, style: _buttonStyle);
} else {
child = TextButton.icon(onPressed: onPressed, icon: first, label: second, style: _buttonStyle);
}
} else if (style == ViamButtonFillStyle.outline) {
child = OutlinedButton(onPressed: onPressed, style: _buttonStyle, child: Text(text));
final iconWidget = (icon != null) ? Icon(icon, size: size.fontSize * 1.25) : const SizedBox.shrink();
final labelWidget = (variant == ViamButtonVariant.iconOnly)
? const SizedBox.shrink()
: Text(
text,
style: TextStyle(fontWeight: (icon != null) ? FontWeight.bold : FontWeight.normal),
);
final first = (variant == ViamButtonVariant.iconTrailing) ? labelWidget : iconWidget;
final second = (variant == ViamButtonVariant.iconTrailing) ? iconWidget : labelWidget;
final widget = Row(mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: [first, second]);
if (style == ViamButtonFillStyle.outline) {
child = OutlinedButton(onPressed: onPressed, style: _buttonStyle, child: widget);
} else {
child = TextButton(onPressed: onPressed, style: _buttonStyle, child: Text(text));
child = TextButton(onPressed: onPressed, style: _buttonStyle, child: widget);
}
if (variant == ViamButtonVariant.iconOnly) {
child = Tooltip(message: text, waitDuration: const Duration(seconds: 1), child: child);
}
return Theme(data: ThemeData(primarySwatch: role.materialColor), child: child);
}</code></pre>
Expand Down
3 changes: 3 additions & 0 deletions widgets_button/ViamButton/icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h1><span class="kind-property">icon</span> property

</section>

<section class="desc markdown">
<p>The icon to display</p>
</section>


<section class="summary source-code" id="source">
Expand Down
3 changes: 3 additions & 0 deletions widgets_button/ViamButton/onPressed.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h1><span class="kind-property">onPressed</span> property

</section>

<section class="desc markdown">
<p>The action that should be performed when the button is pressed</p>
</section>


<section class="summary source-code" id="source">
Expand Down
3 changes: 3 additions & 0 deletions widgets_button/ViamButton/role.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h1><span class="kind-property">role</span> property

</section>

<section class="desc markdown">
<p>The role of the button</p>
</section>


<section class="summary source-code" id="source">
Expand Down
3 changes: 3 additions & 0 deletions widgets_button/ViamButton/size.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h1><span class="kind-property">size</span> property

</section>

<section class="desc markdown">
<p>The size class of the button</p>
</section>


<section class="summary source-code" id="source">
Expand Down
3 changes: 3 additions & 0 deletions widgets_button/ViamButton/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h1><span class="kind-property">style</span> property

</section>

<section class="desc markdown">
<p>The fill style of the button</p>
</section>


<section class="summary source-code" id="source">
Expand Down
3 changes: 3 additions & 0 deletions widgets_button/ViamButton/text.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h1><span class="kind-property">text</span> property

</section>

<section class="desc markdown">
<p>The text of the button</p>
</section>


<section class="summary source-code" id="source">
Expand Down
3 changes: 3 additions & 0 deletions widgets_button/ViamButton/variant.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h1><span class="kind-property">variant</span> property

</section>

<section class="desc markdown">
<p>The button variant</p>
</section>


<section class="summary source-code" id="source">
Expand Down
9 changes: 6 additions & 3 deletions widgets_button/ViamButtonFillStyle.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ <h1>
</div>


<section class="desc markdown">
<p>The fill style of the button.</p>
</section>


<section>
Expand Down Expand Up @@ -110,7 +113,7 @@ <h2>Values</h2>

</dt>
<dd>

<p>The button should be filled entirely</p>


</dd>
Expand All @@ -122,7 +125,7 @@ <h2>Values</h2>

</dt>
<dd>

<p>The button be outlined</p>


</dd>
Expand All @@ -134,7 +137,7 @@ <h2>Values</h2>

</dt>
<dd>

<p>The button's background should be transparent</p>


</dd>
Expand Down
18 changes: 3 additions & 15 deletions widgets_button/ViamButtonRole.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h2>Properties</h2>

</dt>
<dd>

The background color of the button, based on role. Takes dark mode into consideration.
<div class="features"><span class="feature">read-only</span></div>

</dd>
Expand All @@ -194,7 +194,7 @@ <h2>Properties</h2>

</dt>
<dd>

The foreground color of the button, based on role. Takes dark mode into consideration.
<div class="features"><span class="feature">read-only</span></div>

</dd>
Expand Down Expand Up @@ -227,7 +227,7 @@ <h2>Properties</h2>

</dt>
<dd>

The material color of the button, based on role.
<div class="features"><span class="feature">read-only</span></div>

</dd>
Expand All @@ -241,17 +241,6 @@ <h2>Properties</h2>
A representation of the runtime type of the object.
<div class="features"><span class="feature">read-only</span><span class="feature">inherited</span></div>

</dd>

<dt id="style" class="property">
<span class="name"><a href="../widgets_button/ViamButtonRole/style.html">style</a></span>
<span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/material/ButtonStyle-class.html">ButtonStyle</a></span>

</dt>
<dd>

<div class="features"><span class="feature">read-only</span></div>

</dd>

</dl>
Expand Down Expand Up @@ -396,7 +385,6 @@ <h5>button library</h5>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Enum/index.html">index</a></li>
<li><a href="../widgets_button/ViamButtonRole/materialColor.html">materialColor</a></li>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
<li><a href="../widgets_button/ViamButtonRole/style.html">style</a></li>

<li class="section-title inherited"><a href="../widgets_button/ViamButtonRole.html#instance-methods">Methods</a></li>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
Expand Down
1 change: 0 additions & 1 deletion widgets_button/ViamButtonRole/ViamButtonRole.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ <h5>ViamButtonRole enum</h5>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Enum/index.html">index</a></li>
<li><a href="../../widgets_button/ViamButtonRole/materialColor.html">materialColor</a></li>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
<li><a href="../../widgets_button/ViamButtonRole/style.html">style</a></li>

<li class="section-title inherited"><a href="../../widgets_button/ViamButtonRole.html#instance-methods">Methods</a></li>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
Expand Down
4 changes: 3 additions & 1 deletion widgets_button/ViamButtonRole/backgroundColor.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ <h1><span class="kind-property">backgroundColor</span> property
</section>


<section class="desc markdown">
<p>The background color of the button, based on role. Takes dark mode into consideration.</p>
</section>


<section class="summary source-code" id="source">
Expand Down Expand Up @@ -133,7 +136,6 @@ <h5>ViamButtonRole enum</h5>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Enum/index.html">index</a></li>
<li><a href="../../widgets_button/ViamButtonRole/materialColor.html">materialColor</a></li>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
<li><a href="../../widgets_button/ViamButtonRole/style.html">style</a></li>

<li class="section-title inherited"><a href="../../widgets_button/ViamButtonRole.html#instance-methods">Methods</a></li>
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
Expand Down
Loading

0 comments on commit 323d97e

Please sign in to comment.