rush_sdk 0.0.29 copy "rush_sdk: ^0.0.29" to clipboard
rush_sdk: ^0.0.29 copied to clipboard

Rush SDK

Change Log #

0.0.29 #

  • Downgrade intl to 0.19.0

0.0.28 #

  • Update FLutter SDK

~0.0.27 #

  • Update intl to ^0.20.0
  • Add fit to RTImage

0.0.25 #

  • Add RTGradientText
RTGradientText( // example
  'Hello Flutter',
  style: const TextStyle(fontSize: 40),
  gradient: LinearGradient(colors: [
    Colors.blue.shade400,
    Colors.blue.shade900,
  ]),
),

~0.0.24 #

  • Add placeholderBuilder and errorWidget to RTImage
  • Add fadeInDuration and placeholderFadeInDuration to RTImage
  • Add Webview shouldOverrideUrlLoading

0.0.21 #

  • Add support for SVG network images in RTImage
    • Network images with .svg extension are now rendered using SvgPicture.network

0.0.20 #

  • Add RTJsonFormBuilder and RTJsonFormResult for building dynamic forms based on JSON schemas
    • Supports custom form controls through controlBuilder
    • Handles form validation and data updates
    • Compatible with JSON Form specifications
// example

MissionForm(
  mission: mission,
  result: RTJsonFormResult(
    data: mission.answer?.answer ?? {},
    schema: schema,
  ),
  onChanged: (validate, data) {
    setState(() {
      _validate = validate;
    });
  },
);

class MissionForm extends StatelessWidget {
  const MissionForm({
    super.key,
    required this.mission,
    required this.onChanged,
    required this.result,
  });

  final GroupMission mission;
  final Function(
    bool validate,
    Map<String, dynamic> data,
  ) onChanged;
  final RTJsonFormResult result;

  @override
  Widget build(BuildContext context) {
    return RTJsonFormBuilder(
      result: result,
      schemaUI: RTSchemaUI.fromJson(
          mission.mission?.missionType?.schemaUiClient ?? {}),
      onChanged: onChanged,
      controlBuilder: (context, schema, schemaUI, data, setData) {
        if (schema.type == 'string' && schemaUI.options?.multi == true) {
          return ManittoTextArea(
            initialValue: data,
            onChanged: (value) {
              setData(schemaUI, value);
            },
          );
        }
        return const SizedBox.shrink();
      },
    );
  }
}

0.0.19 #

  • add RTWebview.PopScope.onPopInvokedWithResult

0.0.18 #

  • add RTPropertyString
// example

// 1. basic
var propertyString = RTPropertyString(
      items: [
        RTPropertyStringItem(key: 'n', value: 'ES_J'),
        RTPropertyStringItem(key: 'cb', value: '#a0b1c9'),
        RTPropertyStringItem(key: 'cp', value: '#7d91a3'),
        RTPropertyStringItem(key: 'bg', value: '#e5f4e1'),
      ],
    );

print(propertyString.toString()); // "n.ES_J!cb.#a0b1c9!cp.#7d91a3!bg.#e5f4e1"

// 2. fromString
var propertyString = RTPropertyString.fromString(
  "n.ES_J!cb.#a0b1c9!cp.#7d91a3!bg.#e5f4e1",
);

print(propertyString.toJson()); // {n: ES_J, cb: #a0b1c9, cp: #7d91a3, bg: #e5f4e1}

// 3. fromFirebaseStorageUrl
var propertyString = RTPropertyString.fromFirebaseStorageUrl(
  "https://firebasestorage.googleapis.com/v0/b/{project-name}/o/{path}%2Fn!ES_J.cb!%23a0b1c9.cp!%237d91a3.bg!%23e5f4e1.svg?alt=media&token={token}",
);

print(propertyString.toString()); // "n.ES_J!cb.#a0b1c9!cp.#7d91a3!bg.#e5f4e1"

0.0.17 #

  • rename LifeCycle to RTLifeCycle
  • add RTClient.patch
  • rename Version to RTVersion
  • add HexColor

0.0.10 #

  • rename LoadingOverlay to RTLoadingOverlay
  • update required: clients using RTLoadingWidget need to implement custom loading widget with RTLoadingOverlay
// example
class Loading extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return RTLoadingOverlay(child: const Lottie.asset('assets/lottie/loading.json'));
  }
}

0.0.9 #

  • add RTLogger

0.0.8 #

  • add AuthInterceptor
  • add RTClientInterceptor
  • add RTClient

0.0.4 #

  • add class RTImageUtil
    • add RTImageUtil.base64({ file, bytes })
    • add RTImageUtil.base64Prefix({ file, url, ext })

for the format of OpenAI Chat Completions image_url request property

  • class RTImage
    • add RTImage.isCircular
    • add RTImage.radius

0.0.2 #

  • add RTWebview

0.0.1 #

initial release