public override int GetHashCode() { unchecked { var hashCode = (LayoutId != null ? LayoutId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LayoutVariant != null ? LayoutVariant.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LanguageCode != null ? LanguageCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CountryCode != null ? CountryCode.GetHashCode() : 0); return(hashCode); } }
public override Widget build(BuildContext context) { D.assert(WidgetsD.debugCheckHasDirectionality(context)); D.assert(material_.debugCheckHasMaterialLocalizations(context)); D.assert(material_.debugCheckHasMaterialLocalizations(context)); ThemeData theme = Theme.of(context); List <Widget> children = new List <Widget> { }; if (widget.accountName != null) { Widget accountNameLine = new LayoutId( id: _AccountDetailsLayout.accountName, child: new Padding( padding: EdgeInsets.symmetric(vertical: 2.0f), child: new DefaultTextStyle( style: theme.primaryTextTheme.bodyText1, overflow: TextOverflow.ellipsis, child: widget.accountName ) ) ); children.Add(accountNameLine); } if (widget.accountEmail != null) { Widget accountEmailLine = new LayoutId( id: _AccountDetailsLayout.accountEmail, child: new Padding( padding: EdgeInsets.symmetric(vertical: 2.0f), child: new DefaultTextStyle( style: theme.primaryTextTheme.bodyText2, overflow: TextOverflow.ellipsis, child: widget.accountEmail ) ) ); children.Add(accountEmailLine); } if (widget.onTap != null) { Widget dropDownIcon = new LayoutId( id: _AccountDetailsLayout.dropdownIcon, child: new SizedBox( height: UserAccountsDrawerHeaderUtils._kAccountDetailsHeight, width: UserAccountsDrawerHeaderUtils._kAccountDetailsHeight, child: new Center( child: Transform.rotate( angle: _animation.value * Mathf.PI, child: new Icon( Icons.arrow_drop_down, color: widget.arrowColor ) ) ) ) ); children.Add(dropDownIcon); } Widget accountDetails = new CustomMultiChildLayout( layoutDelegate: new _AccountDetailsLayout( Directionality.of(context)), children: children ); if (widget.onTap != null) { accountDetails = new InkWell( onTap: widget.onTap == null ? (GestureTapCallback)null : () => { widget.onTap(); }, child: accountDetails ); } return(new SizedBox( height: UserAccountsDrawerHeaderUtils._kAccountDetailsHeight, child: accountDetails )); }
public override View GetView(Context context, View convertView, ViewGroup parent) { var view = convertView ?? LayoutInflater.FromContext(context).Inflate(LayoutId, parent, false); if (view == null) { Log.Error("Android.Dialog", "ViewElement: Failed to load resource: " + LayoutId.ToString(CultureInfo.InvariantCulture)); } else if (Populate != null) { Populate(view); } return(view); }