xwidget_builder 0.7.3
xwidget_builder: ^0.7.3 copied to clipboard
Development tool for generating XWidget components to build dynamic Flutter UIs with XML based markup.
0.7.3 #
- Widened the
analyzerdependency to>=13.0.0 <15.0.0. Generation output is unchanged on analyzer 14; the golden and type-resolver tests pass on 14.4.0.
0.7.2 #
- Cloud API query and form maps now use Dart's null-aware element syntax
(
'key': ?value) in place ofif (value != null) 'key': value. Same behavior, clears theuse_null_aware_elementslint that pub.flutter-io.cn's analyzer reports.
0.7.1 #
- Fixed:
runCommandreturned theProcess.runfuture from inside itstryblock without awaiting it, so aProcessExceptionraised asynchronously (missing executable, for example) bypassed the handler that was meant to turn it into aProcessResult. Now awaited in place, so the documented "returns error details in stderr" behavior actually holds.
0.7.0 #
- XWidget config and generated schemas now live in a
.xwidget/folder at the project root instead of cluttering the root itself.xwidget_config.yamlandxwidget_cloud.yamlare moved there automatically the first time any command reads them (a copy left in the root alongside a.xwidget/copy is warned about, never silently deleted).initscaffolds new projects with.xwidget/from the start. - Generated schema files are written to
.xwidget/under new names —fragments_schema.g.xsd,routes_schema.g.xsd,values_schema.g.xsd— together withschema_catalog.g.xml, an XML catalog mapping each namespace to its schema for editors that support catalogs. Stale root copies from earlier versions (xwidget_*.g.xsd) are cleaned up after generation; an explicitschema.targetis still honored and never triggers cleanup of files it didn't produce. - The fragment schema's namespace is now
https://xwidget.dev/fragments(routes and values schemas usehttps://xwidget.dev/routesandhttps://xwidget.dev/values). - BREAKING:
generateno longer takes--config. Config is always read from.xwidget/xwidget_config.yaml(falling back to the project root, which triggers the one-time move above). - Fixed: a widget constructor parameter named
visibleorforno longer produces an invalid schema. The base element type already declares those attributes, and re-declaring one is a "duplicate attribute use" XSD violation — strict validators (e.g. xmllint) refused to compile the schema. The inherited declarations still validate the values. - BREAKING:
schema.targetis no longer user-configurable — the schema is always written to.xwidget/fragments_schema.g.xsd, the location the schema catalog points at. Aschema.targetinxwidget_config.yamlis ignored with a warning.
0.6.0 #
- Upgraded the
analyzerdependency from 7.x to>=13.0.0 <14.0.0. Generated output is unchanged. Note: projects on current Flutter stable will resolve analyzer 13.0.0 (itsflutter_testpinsmeta 1.18.0, which analyzer 13.1+ does not accept); newer analyzer versions resolve automatically once Flutter updates itsmetapin. - Minimum Dart SDK is now 3.9; minimum Flutter is 3.35 (the release that ships it).
- Fixed a crash when resolving type parameters with no supplied type arguments; they now
fall back to
dynamic. - Moved the cloud CLI to the XWidget Cloud v2 deployment model. All endpoints now use
/api/v2; older CLI versions are rejected by the server with an upgrade notice. - BREAKING:
xc cloud deployno longer takes--channel. Deploying uploads the bundle and mints a monotonic per-version revision, then offers to publish it. Requires xwidget >= 0.6.0 in the target app. - BREAKING:
xc cloud promoteis replaced byxc cloud publishandxc cloud unpublish. Publishing points a channel at a chosen revision — covering promotion and rollback — and unpublishing removes the channel's pointer without deleting the deployment. - BREAKING:
xc cloud deployment deletenow deletes by project and version, optionally scoped to a single revision; channel-scoped deletion is removed. Revisions live on a channel must be unpublished before they can be deleted. xc cloud deployment listnow shows Version, Revision, Created By, Updated By, and the channels currently serving each deployment.- Version format: build metadata must be a plain number (
1.2.0+42); pre-release identifiers are now accepted. The full version string, including the build number, identifies the deployment and scopes its revision counter. - Added
--yesto publish, unpublish, and deployment delete for non-interactive use. The channel namelocalis reserved. - Added
--publish <channel>(-p) toxc cloud deploy— deploys and publishes the new revision to an existing channel in one step. The channel is validated before the upload; if the upload succeeds but publishing fails, the CLI prints the recoveryxc cloud publishcommand and exits non-zero. Deploy output now includes the minted revision. xc cloud deploynow runs fully non-interactive without a TTY: prompts are skipped,--versionis required, unconfigured resource paths fall back to the defaults, and first-time project creation is refused (run interactively once to create the project).- Rewrote the builder test suite as an end-to-end CLI harness with a golden output baseline and error-path coverage.
0.5.4 #
- Updated the generated schema documentation for
<callback>to match the corrected runtime behavior:returnVaris always stored in the surroundingDependencies(independent ofdependenciesScope), anddependenciesScopecontrols only howactionis evaluated, not wherereturnVaris stored.
0.5.3 #
- Added
keepAliveto the built-inControllerschema element so XML schema validation and IDE completion match the runtime controller attribute. - Updated the default schema config to stop excluding
*:childattributes globally.
0.5.2 #
- Controller code generation now registers factories by explicit class name via
registerControllerFactoryForName(). - Fixes generated controller registration for dart2js/minified web builds.
- Removed
import_cache.jsonoutput.
0.5.1 #
- Controller code generation now skips abstract classes.
0.5.0 #
- BREAKING: Config schema changes in
xwidget_config.yaml. Theresources:group has been removed; use top-levelfragmentsPathandvaluesPathkeys instead. See the upgrade guide for migration steps. - Added a registry builder that generates a single
registry.g.dartexporting aregisterXWidgetComponents()function. Users call this one function frommain.dartinstead of callingregisterXWidgetIcons(),registerXWidgetInflaters(), andregisterXWidgetControllers()manually. Requiresxwidget0.5.0 or newer; on olderxwidgetthe registry is skipped and existing manual-registration patterns continue to work. - Added
registry:section inxwidget_config.yamlwith atarget:key controlling the output path (defaults tolib/xwidget/generated/registry.g.dart). - Registry generation runs after every
generateinvocation regardless of the--onlyflag, so the registry stays in sync with whatever other generated files exist. - Orphaned generated files (target exists but source globs no longer match) are detected and excluded from the registry with a warning.
0.4.3 #
- Reworked schema template for precise child element validation. Context-restricted elements (
param,Entry,Item,else) are now validated only where they're actually allowed. - Added hover documentation to all built-in elements and their attributes in the generated schema. Includes links to full reference docs.
- Added
schema.documentationFormatoption inxwidget_config.yaml(cdataorhtml). Usehtmlfor better hover rendering in IntelliJ-based IDEs. - Added
--schema-docsCLI flag to overrideschema.documentationFormatper invocation. - Fixed path resolution for
xwidget_builderwhen added as a relative path dependency (path: ../../inpubspec.yaml). - Fixed schema compatibility with strict XSD validators (e.g. xmllint).
0.4.2 #
- Fixed inflation of nested parameterized collections (
List<List<Widget>>,List<Map<String, String>>, etc.). AddedcastElementcallback toaddArgthat recursively casts inner elements during argument resolution. The inflater generator now emits_buildCastExpressionlambdas for arbitrary nesting depth. - Simplified
<builder>returnType enumeration fromWidget,Widget?,List:Widget,List:PopupMenuEntrytoListandSingleChild.
0.4.1 #
- Fixed collection return types in function adapters. Parameterized collections
(
List,Set,Iterable,Map) now use.cast<>()instead ofasto satisfy Dart's reified generics.
0.4.0 #
- BREAKING: Requires
xwidget0.4.0. Both packages must be upgraded together. - Fixed Dart 3.4 function type compatibility issue with
Function-typed constructor parameters. - Added
addFnArgtoInflaterArgsfor typed function adapter wrapping. - Inflater generator now emits typed adapter lambdas for all
Function-typed parameters. - Fixed duplicate class handling in inflater spec via deduplication.
0.3.1 #
- Fixed
xc init --new-appnot copyingfragment/count.xmlto the resources folder
0.3.0 #
- Cloud management CLI — deploy, promote, and manage workspaces, projects, channels, and deployments via
xc cloud. - Analytics CLI — query render, download, error, and page transition data via
xc analytics. - Project key rotation with configurable grace periods (0–90 days).
xctop-level CLI entry point for all XWidget Builder commands.- Full documentation site at docs.xwidget.dev.
- Updated minimum Dart SDK to 3.8.
0.2.1 #
- Resolved major pain points with default values and imports. Constructor defaults now
delegate to the underlying widget, and imports are automatically resolved through
export analysis. Manual overrides in
xwidget_config.yamlremains available for edge cases. - Fixed issue with the source analyzer not recognizing library parts
- Improved inflater error messages
0.2.0 #
Breaking Changes #
- Increased Flutter version constraint from >=1.17.0 to >=3.10.0
- Decreased Dart SDK constraint from >=3.4.4 to >=3.0.0
- Fixed bug with dependency versioning
- Fixed builder tests
0.1.2 #
- Fixed several issues with project initialization scripts
0.1.1 #
- Added example usage
- Updated package description
0.1.0 #
- Initial release.