Ejemplo n.º 1
0
 public _SearchPage(
     SearchDelegate <T> del,
     Animation <float> animation
     )
 {
     this.del       = del;
     this.animation = animation;
 }
Ejemplo n.º 2
0
 public _SearchPageRoute(SearchDelegate <T> del)
 {
     D.assert(del != null);
     D.assert(del._route == null,
              () => $"The {this.del.GetType()} instance is currently used by another active " +
              "search. Please close that search by calling close() on the SearchDelegate " +
              "before openening another search with the same delegate instance."
              );
     this.del        = del;
     this.del._route = this;
 }
Ejemplo n.º 3
0
        public static Future <T> showSearch <T>(
            BuildContext context,
            SearchDelegate <T> del,
            string query = ""
            )
        {
            D.assert(del != null);
            D.assert(context != null);

            del.query        = query ?? del.query;
            del._currentBody = _SearchBody.suggestions;
            return(Navigator.of(context).push <T>(new _SearchPageRoute <T>(
                                                      del: del
                                                      )));
        }